jitterentropy: fix if condition, fix warning

Ref #4344
This commit is contained in:
Stefan Kalkowski 2021-12-13 15:27:06 +01:00 committed by Norman Feske
parent f5193874c8
commit 86df5b1285
3 changed files with 16 additions and 2 deletions

View File

@ -1 +1 @@
6017e180a44d9c0871764ab328ea9e8539ff5688
b982a76430613834d1df5877fd528e4fa0c65fb2

View File

@ -12,7 +12,8 @@ DIRS := include/jitterentropy
DIR_CONTENT(include/jitterentropy) := $(addprefix src/lib/jitterentropy/,\
jitterentropy.h)
PATCHES := src/lib/jitterentropy/jitterentropy_h.patch
PATCHES := src/lib/jitterentropy/jitterentropy_h.patch \
src/lib/jitterentropy/jitterentropy_delta_compare.patch
PATCH_OPT := -p1 -d src/lib/jitterentropy
#

View File

@ -0,0 +1,13 @@
diff --git a/jitterentropy-base.c b/jitterentropy-base.c
index c71e1e7..28b1462 100644
--- a/jitterentropy-base.c
+++ b/jitterentropy-base.c
@@ -754,7 +754,7 @@ int jent_entropy_init(void)
* than 1 to ensure the entropy estimation
* implied with 1 is preserved
*/
- if (!(delta_sum) > 1)
+ if (!(delta_sum > 1))
return EMINVARVAR;
/*