Browse Source

fix expected value returned by fscanf

Samuel Thibault 14 years ago
parent
commit
352161434e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/perfmodel/perfmodel_bus.c

+ 2 - 2
src/core/perfmodel/perfmodel_bus.c

@@ -686,7 +686,7 @@ static int load_bus_latency_file_content(void)
 		}
 
 		n = fscanf(f, "%c", &c);
-		if (n != 0 || c != '\n') {
+		if (n != 1 || c != '\n') {
 			fclose(f);
 			return 0;
 		}
@@ -821,7 +821,7 @@ static int load_bus_bandwidth_file_content(void)
 		}
 
 		n = fscanf(f, "%c", &c);
-		if (n != 0 || c != '\n') {
+		if (n != 1 || c != '\n') {
 			fclose(f);
 			return 0;
 		}