fix sign issue in bitshift
authorChristian Grothoff <christian@grothoff.org>
Wed, 22 Feb 2017 13:25:06 +0000 (14:25 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 22 Feb 2017 13:25:06 +0000 (14:25 +0100)
src/core/gnunet-service-core_kx.c

index a0c34373784323d8eeb799fcd4da8b36bc85b2c1..9068985123fd1723489f5b102400e5177ac82ee0 100644 (file)
@@ -319,7 +319,7 @@ struct GSC_KeyExchangeInfo
    * last were received (good for accepting out-of-order packets and
    * estimating reliability of the connection)
    */
-  unsigned int last_packets_bitmap;
+  uint32_t last_packets_bitmap;
 
   /**
    * last sequence number received on this connection (highest)
@@ -1573,7 +1573,7 @@ handle_encrypted (void *cls,
   }
   if (kx->last_sequence_number_received > snum)
   {
-    unsigned int rotbit = 1 << (kx->last_sequence_number_received - snum - 1);
+    uint32_t rotbit = 1U << (kx->last_sequence_number_received - snum - 1);
 
     if ((kx->last_packets_bitmap & rotbit) != 0)
     {