Parcourir la source

src: small fixes

Nathalie Furmento il y a 9 ans
Parent
commit
d4c45c6e0c
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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+");
 	f = fopen(filepath, "a+");
 	STARPU_ASSERT_MSG(f, "Could not save performance model into the file %s\n", filepath);
 	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)
 	while((line=fgets(buffer,sizeof(buffer),f))!=NULL)
 	{
 	{
 		char *record = strtok(line,",");
 		char *record = strtok(line,",");