aboutsummaryrefslogtreecommitdiff
path: root/src/fragmentation/defragmentation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fragmentation/defragmentation.c')
-rw-r--r--src/fragmentation/defragmentation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c
index 5433ffb5a..50fc4a1d5 100644
--- a/src/fragmentation/defragmentation.c
+++ b/src/fragmentation/defragmentation.c
@@ -506,7 +506,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
506 if (n == 64) 506 if (n == 64)
507 mc->bits = UINT64_MAX; /* set all 64 bit */ 507 mc->bits = UINT64_MAX; /* set all 64 bit */
508 else 508 else
509 mc->bits = (1LL << n) - 1; /* set lowest 'bits' bit */ 509 mc->bits = (1LLU << n) - 1; /* set lowest 'bits' bit */
510 if (dc->list_size >= dc->num_msgs) 510 if (dc->list_size >= dc->num_msgs)
511 discard_oldest_mc (dc); 511 discard_oldest_mc (dc);
512 GNUNET_CONTAINER_DLL_insert (dc->head, 512 GNUNET_CONTAINER_DLL_insert (dc->head,
@@ -516,9 +516,9 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
516 } 516 }
517 517
518 /* copy data to 'mc' */ 518 /* copy data to 'mc' */
519 if (0 != (mc->bits & (1LL << bit))) 519 if (0 != (mc->bits & (1LLU << bit)))
520 { 520 {
521 mc->bits -= 1LL << bit; 521 mc->bits -= 1LLU << bit;
522 mbuf = (char *) &mc[1]; 522 mbuf = (char *) &mc[1];
523 memcpy (&mbuf[bit * (dc->mtu - sizeof (struct FragmentHeader))], &fh[1], 523 memcpy (&mbuf[bit * (dc->mtu - sizeof (struct FragmentHeader))], &fh[1],
524 ntohs (msg->size) - sizeof (struct FragmentHeader)); 524 ntohs (msg->size) - sizeof (struct FragmentHeader));
@@ -543,7 +543,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
543 /* count number of missing fragments after the current one */ 543 /* count number of missing fragments after the current one */
544 bc = 0; 544 bc = 0;
545 for (b = bit; b < 64; b++) 545 for (b = bit; b < 64; b++)
546 if (0 != (mc->bits & (1LL << b))) 546 if (0 != (mc->bits & (1LLU << b)))
547 bc++; 547 bc++;
548 else 548 else
549 bc = 0; 549 bc = 0;