Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
lua layer that reimplements SPLAY methodsfor rpc, job and events modules, with a...
[simgrid.git] / examples / msg / masterslave / masterslave_console.c
index fd78488..fc1b757 100644 (file)
@@ -71,15 +71,16 @@ int slave(int argc, char *argv[])
   int res;
   int id = -1;
   char mailbox[80];
+  int read;
 
-  xbt_assert1(sscanf(argv[1], "%d", &id),
-              "Invalid argument %s\n", argv[1]);
+  read = sscanf(argv[1], "%d", &id);
+  xbt_assert(read, "Invalid argument %s\n", argv[1]);
 
   sprintf(mailbox, "slave-%d", id);
 
   while (1) {
     res = MSG_task_receive(&(task), mailbox);
-    xbt_assert0(res == MSG_OK, "MSG_task_get failed");
+    xbt_assert(res == MSG_OK, "MSG_task_get failed");
 
     XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
     if (!strcmp(MSG_task_get_name(task), "finalize")) {