X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..80daf536b469046756c5064f704e5089c85c1d0a:/examples/msg/masterslave/masterslave_console.c diff --git a/examples/msg/masterslave/masterslave_console.c b/examples/msg/masterslave/masterslave_console.c index fd7848828f..fc1b7573f7 100644 --- a/examples/msg/masterslave/masterslave_console.c +++ b/examples/msg/masterslave/masterslave_console.c @@ -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")) {