diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-12 09:36:33 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-12 09:36:33 +0200 |
commit | 99f8204531ebb4d388eec7919afd4b7a3ae0b096 (patch) | |
tree | 8c606540b59d1cf0d8ee23114b54112c271af400 /src/util/common_allocation.c | |
parent | be3bbfb4728669698ad7dabb5e0d8648d31a43a8 (diff) | |
download | gnunet-99f8204531ebb4d388eec7919afd4b7a3ae0b096.tar.gz gnunet-99f8204531ebb4d388eec7919afd4b7a3ae0b096.zip |
fix: GNUNET_is_zero(ptr) should return enum GNUNET_GenericReturnValue. Fixes #6475.
Diffstat (limited to 'src/util/common_allocation.c')
-rw-r--r-- | src/util/common_allocation.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index 4aad49777..a404a1627 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -538,9 +538,9 @@ GNUNET_copy_message (const struct GNUNET_MessageHeader *msg) | |||
538 | * @param a pointer to @a n bytes which should be tested for the | 538 | * @param a pointer to @a n bytes which should be tested for the |
539 | * entire memory being zero'ed out. | 539 | * entire memory being zero'ed out. |
540 | * @param n number of bytes in @a to be tested | 540 | * @param n number of bytes in @a to be tested |
541 | * @return 0 if a is zero, non-zero otherwise | 541 | * @return GNUNET_YES if a is zero, GNUNET_NO otherwise |
542 | */ | 542 | */ |
543 | int | 543 | enum GNUNET_GenericReturnValue |
544 | GNUNET_is_zero_ (const void *a, | 544 | GNUNET_is_zero_ (const void *a, |
545 | size_t n) | 545 | size_t n) |
546 | { | 546 | { |
@@ -548,8 +548,8 @@ GNUNET_is_zero_ (const void *a, | |||
548 | 548 | ||
549 | for (size_t i = 0; i < n; i++) | 549 | for (size_t i = 0; i < n; i++) |
550 | if (b[i]) | 550 | if (b[i]) |
551 | return 1; | 551 | return GNUNET_NO; |
552 | return 0; | 552 | return GNUNET_YES; |
553 | } | 553 | } |
554 | 554 | ||
555 | 555 | ||