bmf: explicitly cast fgetc result into a char
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 22 Oct 2012 13:24:25 +0000 (15:24 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 22 Oct 2012 13:33:15 +0000 (15:33 +0200)
Coverity:
CID 739615 (#1 of 1): Truncated stdio return value (CHAR_IO)
Assigning the return value of "fgetc(FILE *)" to char "EthTapSpoofState"
truncates its value.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/bmf/src/NetworkInterfaces.c

index 7441417..ac46bbd 100644 (file)
@@ -362,7 +362,7 @@ int DeactivateSpoofFilter(void)
     return 0;
   }
 
-  EthTapSpoofState = fgetc(procSpoof);
+  EthTapSpoofState = (char)fgetc(procSpoof);
   fclose(procSpoof);
 
   /* Open procfile for writing */