mirror of git://git.suckless.org/ubase
Use ferror() if fgets() returns NULL
This commit is contained in:
parent
0c0a191fcb
commit
35bff9489e
2
lsmod.c
2
lsmod.c
|
@ -45,6 +45,8 @@ main(int argc, char *argv[])
|
|||
printf("%-20s%8s%3s %s\n", name, size, refcount,
|
||||
users);
|
||||
}
|
||||
if (ferror(fp))
|
||||
eprintf("%s: read error:", modfile);
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue