Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Check argc.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 8 Mar 2020 18:10:33 +0000 (19:10 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 9 Mar 2020 09:14:45 +0000 (10:14 +0100)
examples/c/exec-waitany/exec-waitany.c

index 880e1b3..7f65a20 100644 (file)
@@ -15,6 +15,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(exec_waitany, "Messages specific for this example")
 
 static void worker(int argc, char* argv[])
 {
+  xbt_assert(argc > 1);
   int with_timeout = !strcmp(argv[1], "true");
 
   /* Vector in which we store all pending executions*/