Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Please codacy (integer type consistency).
[simgrid.git] / examples / msg / app-bittorrent / peer.c
index 427df2b..7c248b3 100644 (file)
@@ -17,8 +17,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_peers, "Messages specific for the peers");
  * User parameters for transferred file data. For the test, the default values are :
  * File size: 10 pieces * 5 blocks/piece * 16384 bytes/block = 819200 bytes
  */
-#define FILE_PIECES  10U
-#define PIECES_BLOCKS 5U
+#define FILE_PIECES 10UL
+#define PIECES_BLOCKS 5UL
 #define BLOCK_SIZE  16384
 static const unsigned long int FILE_SIZE = FILE_PIECES * PIECES_BLOCKS * BLOCK_SIZE;
 
@@ -572,7 +572,7 @@ void update_choked_peers(peer_t peer)
 {
   if (nb_interested_peers(peer) == 0)
     return;
-  XBT_DEBUG("(%d) update_choked peers %d active peers", peer->id, xbt_dict_size(peer->active_peers));
+  XBT_DEBUG("(%d) update_choked peers %u active peers", peer->id, xbt_dict_size(peer->active_peers));
   //update the current round
   peer->round = (peer->round + 1) % 3;
   char *key;