Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make bprintf abort on error, and define bvprintf accordingly.
[simgrid.git] / examples / amok / bandwidth / bandwidth.c
index e5d5de9..5ef8a16 100644 (file)
@@ -92,9 +92,8 @@ int maestro(int argc, char *argv[])
   gras_msg_handleall(5);        /* friends, we're ready. Come and play */
 
   if (xbt_dynar_length(group) < 2) {
-    char *msg;
-    asprintf(&msg, "Not enough peers arrived. Expected 2 got %ld",
-             xbt_dynar_length(group));
+    char *msg = bprintf("Not enough peers arrived. Expected 2 got %ld",
+                        xbt_dynar_length(group));
     amok_pm_group_shutdown("bandwidth");
     xbt_die(msg);
   }