Style: Don't treat pointers as booleans.
This commit is contained in:
parent
0df46c2bed
commit
5cb3e55396
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user