* src/od.c (read_char, dump_strings, main):
Instead of testing for an exact negative number,
just look at the sign bit. This is a very minor tweak.
*c = EOF;
- while (in_stream != nullptr) /* EOF. */
+ while (in_stream && (*c = fgetc (in_stream)) < 0)
{
- *c = fgetc (in_stream);
-
- if (*c != EOF)
- break;
-
ok &= check_and_close (errno);
-
ok &= open_next_file ();
}
}
}
- if (c == -1 || i - !c < string_min)
+ if (c < 0 || i - !c < string_min)
continue;
buf[i] = 0;
cleanup:
- if (have_read_stdin && fclose (stdin) == EOF)
+ if (have_read_stdin && fclose (stdin) < 0)
error (EXIT_FAILURE, errno, _("standard input"));
return ok ? EXIT_SUCCESS : EXIT_FAILURE;