Przeglądaj źródła

src: small fixes

Nathalie Furmento 8 lat temu
rodzic
commit
d4c45c6e0c
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      src/core/perfmodel/multiple_regression.c

+ 2 - 1
src/core/perfmodel/multiple_regression.c

@@ -69,7 +69,8 @@ static void load_old_calibration(double *mx, double *my, unsigned nparameters, c
 	f = fopen(filepath, "a+");
 	STARPU_ASSERT_MSG(f, "Could not save performance model into the file %s\n", filepath);
 
-	fgets(buffer,sizeof(buffer),f);//skipping first line
+	line = fgets(buffer,sizeof(buffer),f);//skipping first line
+	STARPU_ASSERT(line);
 	while((line=fgets(buffer,sizeof(buffer),f))!=NULL)
 	{
 		char *record = strtok(line,",");