Style: Don't treat pointers as booleans.

This commit is contained in:
fanf 2002-09-10 20:53:46 +00:00
parent 0df46c2bed
commit 5cb3e55396

View File

@ -117,7 +117,7 @@ main(int argc, char *argv[])
if (*argv) {
rval = 0;
do {
if (!freopen(filename = *argv, "r", stdin)) {
if (freopen(filename = *argv, "r", stdin) == NULL) {
warn("%s", *argv);
rval = 1;
continue;
@ -243,7 +243,7 @@ decode2(void)
/* for each input line */
for (;;) {
if (!fgets(p = buf, sizeof(buf), stdin)) {
if (fgets(p = buf, sizeof(buf), stdin) == NULL) {
warnx("%s: short file", filename);
return (1);
}