Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't let field unitialized.
[simgrid.git] / examples / msg / app-chainsend / broadcaster.c
index 61a1aca..23c4484 100644 (file)
@@ -79,6 +79,7 @@ broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count)
   int status;
   broadcaster_t bc = xbt_new(s_broadcaster_t, 1);
 
+  bc->first             = NULL;
   bc->piece_count = piece_count;
   bc->current_piece = 0;
   bc->host_list = host_list;
@@ -114,9 +115,9 @@ int broadcaster(int argc, char *argv[])
   /* argv[2] is the number of pieces */
   if (argc > 2) {
     piece_count = xbt_str_parse_int(argv[2], "Invalid number of pieces: %s");
-    XBT_DEBUG("piece_count set to %d", piece_count);
+    XBT_DEBUG("piece_count set to %u", piece_count);
   } else {
-    XBT_DEBUG("No piece_count specified, defaulting to %d", piece_count);
+    XBT_DEBUG("No piece_count specified, defaulting to %u", piece_count);
   }
   broadcaster_t bc = broadcaster_init(host_list, piece_count);