Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Access static member with "::".
[simgrid.git] / contrib / benchmarking_code_block / inject.h
index 8d7907d..507e8db 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@ static inline void xbt_inject_init(char *inputfile)
   if (fgets(line, 200, fpInput) == NULL)
     printf("Error input file is empty!"); // Skipping first row
   while (fgets(line, 200, fpInput) != NULL) {
-    char *saveptr; /* for strtok_r() */
+    char *saveptr = NULL; /* for strtok_r() */
     key = strtok_r(line, "\t", &saveptr);
 
     xbt_hist_t* data = xbt_dict_get_or_null(mydict, key);
@@ -119,7 +119,7 @@ static inline void inject_init_starpu(char *inputfile, xbt_dict_t *dict, RngStre
   }
 
   while (fgets(line, MAX_LINE_INJ, fpInput) != NULL) {
-    char *saveptr; /* for strtok_r() */
+    char *saveptr = NULL; /* for strtok_r() */
     key = strtok_r(line, "\t", &saveptr);
 
     xbt_hist_t* data = xbt_dict_get_or_null(mydict, key);