diff options
Diffstat (limited to 'src/set/gnunet-service-set_union.c')
-rw-r--r-- | src/set/gnunet-service-set_union.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index b2983545f..730124495 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c | |||
@@ -739,11 +739,10 @@ get_order_from_difference (unsigned int diff) | |||
739 | unsigned int ibf_order; | 739 | unsigned int ibf_order; |
740 | 740 | ||
741 | ibf_order = 2; | 741 | ibf_order = 2; |
742 | while ( (1<<ibf_order) < (IBF_ALPHA * diff) || | 742 | while ( ( (1<<ibf_order) < (IBF_ALPHA * diff) || |
743 | ((1<<ibf_order) < SE_IBF_HASH_NUM) ) | 743 | ((1<<ibf_order) < SE_IBF_HASH_NUM) ) && |
744 | (ibf_order < MAX_IBF_ORDER) ) | ||
744 | ibf_order++; | 745 | ibf_order++; |
745 | if (ibf_order > MAX_IBF_ORDER) | ||
746 | ibf_order = MAX_IBF_ORDER; | ||
747 | // add one for correction | 746 | // add one for correction |
748 | return ibf_order + 1; | 747 | return ibf_order + 1; |
749 | } | 748 | } |