diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-01-21 08:32:29 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-01-21 08:32:29 +0000 |
commit | f4984f2ed8e51b9eb7b682e402955819a1d691b6 (patch) | |
tree | 9a7d28c6e67e330256d334cea9f6b52365914d46 /src/fragmentation/fragmentation.c | |
parent | bb5fe91d23b0938baa3c4f0e92a83df659df216a (diff) | |
download | gnunet-f4984f2ed8e51b9eb7b682e402955819a1d691b6.tar.gz gnunet-f4984f2ed8e51b9eb7b682e402955819a1d691b6.zip |
force 1 to be 64-bit integer, due to shift by up to 63 bits
Diffstat (limited to 'src/fragmentation/fragmentation.c')
-rw-r--r-- | src/fragmentation/fragmentation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index edc8c1646..a702fd35d 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c | |||
@@ -262,7 +262,7 @@ transmit_next (void *cls, | |||
262 | delay = GNUNET_TIME_UNIT_ZERO; | 262 | delay = GNUNET_TIME_UNIT_ZERO; |
263 | delay = GNUNET_TIME_relative_max (delay, | 263 | delay = GNUNET_TIME_relative_max (delay, |
264 | GNUNET_TIME_relative_multiply (fc->msg_delay, | 264 | GNUNET_TIME_relative_multiply (fc->msg_delay, |
265 | (1 << fc->num_rounds))); | 265 | (1ULL << fc->num_rounds))); |
266 | if (wrap) | 266 | if (wrap) |
267 | { | 267 | { |
268 | /* full round transmitted wait 2x delay for ACK before going again */ | 268 | /* full round transmitted wait 2x delay for ACK before going again */ |
@@ -420,10 +420,10 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc, | |||
420 | snd_cnt = 0; | 420 | snd_cnt = 0; |
421 | for (i=0;i<64;i++) | 421 | for (i=0;i<64;i++) |
422 | { | 422 | { |
423 | if (1 == (fc->acks_mask & (1 << i))) | 423 | if (1 == (fc->acks_mask & (1ULL << i))) |
424 | { | 424 | { |
425 | snd_cnt++; | 425 | snd_cnt++; |
426 | if (0 == (abits & (1 << i))) | 426 | if (0 == (abits & (1ULL << i))) |
427 | ack_cnt++; | 427 | ack_cnt++; |
428 | } | 428 | } |
429 | } | 429 | } |