X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/91715e2f198242d378e33453014dd004fcf9f47e..5eecba1cd4850c7820f9cfa3c1af484f674b1e8b:/examples/msg/icomms/peer3.c diff --git a/examples/msg/icomms/peer3.c b/examples/msg/icomms/peer3.c index 8b22f55b15..6fcef1eae9 100644 --- a/examples/msg/icomms/peer3.c +++ b/examples/msg/icomms/peer3.c @@ -69,7 +69,7 @@ int sender(int argc, char *argv[]) task = NULL; res_irecv = MSG_task_irecv(&(task), mailbox); res_wait = MSG_comm_wait(res_irecv, -1); - xbt_assert0(res == MSG_OK, "MSG_comm_wait failed"); + xbt_assert0(res_wait == MSG_OK, "MSG_comm_wait failed"); MSG_comm_destroy(res_irecv); MSG_task_destroy(task); } @@ -88,7 +88,8 @@ int receiver(int argc, char *argv[]) int tasks = atof(argv[2]); m_task_t *task = xbt_new(m_task_t, tasks); - int read = sscanf(argv[1], "%d", &id); + int read; + read = sscanf(argv[1], "%d", &id); xbt_assert1(read, "Invalid argument %s\n", argv[1]); sprintf(mailbox, "receiver-%d", id); MSG_process_sleep(10);