Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make bprintf abort on error, and define bvprintf accordingly.
[simgrid.git] / src / simix / smx_global.c
index 9be6131..c4a7995 100644 (file)
@@ -104,12 +104,11 @@ void SIMIX_display_process_status(void)
   xbt_swag_foreach(process, simix_global->process_list) {
     char *who, *who2;
 
-    if (asprintf(&who, "%s on %s: %s",
-                 process->name,
-                 process->smx_host->name,
-                 (process->blocked) ? "[BLOCKED] "
-                 : ((process->suspended) ? "[SUSPENDED] " : "")) == -1)
-      xbt_die("asprintf failed");
+    who = bprintf("%s on %s: %s",
+                  process->name,
+                  process->smx_host->name,
+                  (process->blocked) ? "[BLOCKED] "
+                  : ((process->suspended) ? "[SUSPENDED] " : ""));
 
     if (process->mutex) {
       who2 =