Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
just a little mistake on this example
[simgrid.git] / examples / gras / mutual_exclusion / simple_token / simple_token.c
index 2460b60..7931730 100644 (file)
@@ -149,7 +149,7 @@ int node (int argc,char *argv[]) {
 
   /* 8. One node has to create the token at startup. 
         It's specified by a command line argument */
 
   /* 8. One node has to create the token at startup. 
         It's specified by a command line argument */
-  if (argc >= 5 && !strncmp("--create-token", argv[4],strlen(argv[4])))
+  if (argc >= 5 && !strncmp("--create-token", argv[4],strlen("--create-token")))
     globals->create=1;
 
   if (globals->create) {
     globals->create=1;
 
   if (globals->create) {