wmifinfo: Fix -Wunused-result compiler warnings.

This commit is contained in:
Doug Torrance 2014-12-08 21:01:51 -06:00 committed by Carlos R. Mafra
parent 2521cf102f
commit 83981ad8a3

View file

@ -355,7 +355,10 @@ void exec_cmd(char *cmd)
pid=fork(); pid=fork();
if(pid == 0) { if(pid == 0) {
system(cmd); if (system(cmd) == -1) {
fprintf(stderr, "%s failed\n", cmd);
exit(1);
}
exit(0); exit(0);
} }
@ -675,7 +678,6 @@ void getifnames(void)
exit(1); exit(1);
} }
fgets(buf, sizeof(buf),f);
while(fgets(buf, sizeof(buf), f)) { while(fgets(buf, sizeof(buf), f)) {
p1=buf; p1=buf;
while(*p1 == ' ') p1++; while(*p1 == ' ') p1++;