diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-18 00:44:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-18 00:44:39 +0200 |
commit | 7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (patch) | |
tree | 5f1b18463f641f24fad519e0aefb60b97d707b52 /src/revocation/revocation_api.c | |
parent | 28ab2c446fba4980a8295d59fdf203a028a35dd6 (diff) | |
download | gnunet-7f4ddbcab8598e3d5e29c23ce883cdfa664408f1.tar.gz gnunet-7f4ddbcab8598e3d5e29c23ce883cdfa664408f1.zip |
merge flags into enum for GNUNET_DISK_pipe() API, fixing #6188
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r-- | src/revocation/revocation_api.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 3815e47b0..e0b195aa9 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -468,9 +468,9 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow, | |||
468 | /** | 468 | /** |
469 | * First, check if PoW set is strictly monotically increasing | 469 | * First, check if PoW set is strictly monotically increasing |
470 | */ | 470 | */ |
471 | for (unsigned int i = 0; i < POW_COUNT-1; i++) | 471 | for (unsigned int i = 0; i < POW_COUNT - 1; i++) |
472 | { | 472 | { |
473 | if (GNUNET_ntohll (pow->pow[i]) >= GNUNET_ntohll (pow->pow[i+1])) | 473 | if (GNUNET_ntohll (pow->pow[i]) >= GNUNET_ntohll (pow->pow[i + 1])) |
474 | return GNUNET_NO; | 474 | return GNUNET_NO; |
475 | } | 475 | } |
476 | GNUNET_memcpy (&buf[sizeof(uint64_t)], | 476 | GNUNET_memcpy (&buf[sizeof(uint64_t)], |
@@ -592,6 +592,7 @@ GNUNET_REVOCATION_pow_start (struct GNUNET_REVOCATION_PowP *pow, | |||
592 | return pc; | 592 | return pc; |
593 | } | 593 | } |
594 | 594 | ||
595 | |||
595 | /** | 596 | /** |
596 | * Comparison function for quicksort | 597 | * Comparison function for quicksort |
597 | * | 598 | * |
@@ -602,9 +603,10 @@ GNUNET_REVOCATION_pow_start (struct GNUNET_REVOCATION_PowP *pow, | |||
602 | static int | 603 | static int |
603 | cmp_pow_value (const void *a, const void *b) | 604 | cmp_pow_value (const void *a, const void *b) |
604 | { | 605 | { |
605 | return ( GNUNET_ntohll(*(uint64_t*)a) - GNUNET_ntohll(*(uint64_t*)b)); | 606 | return (GNUNET_ntohll (*(uint64_t*) a) - GNUNET_ntohll (*(uint64_t*) b)); |
606 | } | 607 | } |
607 | 608 | ||
609 | |||
608 | /** | 610 | /** |
609 | * Calculate a key revocation valid for broadcasting for a number | 611 | * Calculate a key revocation valid for broadcasting for a number |
610 | * of epochs. | 612 | * of epochs. |