Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bug-- and a bit less brain overload
[simgrid.git] / teshsuite / msg / pid / pid.c
index 3a30fc5..ebe6b3a 100644 (file)
@@ -43,12 +43,12 @@ static int killall(int argc, char *argv[]){
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
-  msg_error_t res = MSG_OK;
-
   MSG_init(&argc, argv);
 
+  xbt_assert(argc >= 2, "Usage: pid platform pid_to_kill");
+
   MSG_process_killall(atoi(argv[2]));
 
   MSG_create_environment(argv[1]);
@@ -57,7 +57,5 @@ int main(int argc, char *argv[])
   MSG_process_create("sendpid", sendpid, NULL, MSG_get_host_by_name("Tremblay"));
   MSG_process_create("killall", killall, NULL, MSG_get_host_by_name("Tremblay"));
 
-  res = MSG_main();
-
-  return res != MSG_OK;
+  return MSG_main() != MSG_OK;
 }