Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Get rid of "%s" in second argument of function xbt_str_parse_*.
[simgrid.git] / examples / c / app-masterworker / app-masterworker.c
index a7df2d8..c81825a 100644 (file)
@@ -21,10 +21,10 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(app_masterworker, "Messages specific for this examp
 static void master(int argc, char* argv[])
 {
   xbt_assert(argc == 5, "The master function expects 4 arguments from the XML deployment file");
-  long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");       /* - Number of tasks      */
-  double comp_size     = xbt_str_parse_double(argv[2], "Invalid computational size: %s"); /* - Compute cost    */
-  long comm_size       = xbt_str_parse_int(argv[3], "Invalid communication size: %s");    /* - Communication size */
-  long workers_count   = xbt_str_parse_int(argv[4], "Invalid amount of workers: %s");     /* - Number of workers    */
+  long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks");       /* - Number of tasks      */
+  double comp_size     = xbt_str_parse_double(argv[2], "Invalid computational size"); /* - Compute cost    */
+  long comm_size       = xbt_str_parse_int(argv[3], "Invalid communication size");    /* - Communication size */
+  long workers_count   = xbt_str_parse_int(argv[4], "Invalid amount of workers");     /* - Number of workers    */
 
   XBT_INFO("Got %ld workers and %ld tasks to process", workers_count, number_of_tasks);
 
@@ -62,7 +62,7 @@ static void worker(int argc, char* argv[])
              "The worker expects a single argument from the XML deployment file: its worker ID (its numerical rank)");
   char mailbox_name[80];
 
-  long id = xbt_str_parse_int(argv[1], "Invalid argument %s");
+  long id = xbt_str_parse_int(argv[1], "Invalid argument");
 
   snprintf(mailbox_name, 79, "worker-%ld", id);
   sg_mailbox_t mailbox = sg_mailbox_by_name(mailbox_name);