Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar by removing useless asignments and return statements
[simgrid.git] / teshsuite / msg / get_sender / get_sender.c
index 75e816f..2048b5f 100644 (file)
@@ -30,16 +30,12 @@ static int receiver_fun(int argc, char *argv[])
 
 int main(int argc, char *argv[])
 {
-  msg_error_t res = MSG_OK;
-
   MSG_init(&argc, argv);
 
   MSG_create_environment(argv[1]);
 
-  MSG_function_register("send", &sender_fun);
-  MSG_function_register("receive", &receiver_fun);
-  MSG_launch_application(argv[2]);
-  res = MSG_main();
+  MSG_process_create("send", sender_fun, NULL, MSG_get_host_by_name("Tremblay"));
+  MSG_process_create("receive", receiver_fun, NULL, MSG_get_host_by_name("Tremblay"));
 
-  return res != MSG_OK;
+  return MSG_main() != MSG_OK;
 }