Explorar o código

fix expected value returned by fscanf

Samuel Thibault %!s(int64=14) %!d(string=hai) anos
pai
achega
352161434e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;
 		}