Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Die on error.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 20 Oct 2019 19:03:22 +0000 (21:03 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 20 Oct 2019 20:53:14 +0000 (22:53 +0200)
contrib/benchmarking_code_block/inject.h

index 507e8db..f5a9261 100644 (file)
@@ -56,8 +56,7 @@ static inline void xbt_inject_init(char *inputfile)
 {
   xbt_dict_t mydict = get_dict();
   FILE* fpInput     = fopen(inputfile, "r");
 {
   xbt_dict_t mydict = get_dict();
   FILE* fpInput     = fopen(inputfile, "r");
-  if (fpInput == NULL)
-    printf("Error while opening the inputfile");
+  xbt_assert(fpInput != NULL, "Error while opening the inputfile");
   fseek(fpInput, 0, 0);
 
   char line[200];
   fseek(fpInput, 0, 0);
 
   char line[200];