diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-03 17:05:02 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-03 17:05:02 +0200 |
commit | f50af5edddee3a5d7d353b3829829c00a16890cc (patch) | |
tree | 07fe3da2dd1c59de7ffa53e768b5c2db6122d22a /src/util | |
parent | 55bff52a2a38b9e768b929b4b6204ac02f074cbf (diff) |
fix zero test
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/common_allocation.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index 5945fdcde..fd91e23b2 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c @@ -546,10 +546,11 @@ GNUNET_is_zero_ (const void *a, size_t n) { const char *b = a; + for (size_t i = 0; i < n; i++) if (b[i]) - return 0; - return 1; + return 1; + return 0; } |