- bail out if screen resolution does not match PPM dimensions.
[oweals/busybox.git] / util-linux / hexdump.c
index 4d2b0592ba3e394671c68c1462a7ae918ec367a0..48edd70a930e2acf5ac45f68be104e288f35924e 100644 (file)
 
 /* This is a NOEXEC applet. Be very careful! */
 
-
 static void bb_dump_addfile(dumper_t *dumper, char *name)
 {
        char *p;
        FILE *fp;
        char *buf;
 
-       fp = xfopen(name, "r");
-
+       fp = xfopen_for_read(name);
        while ((buf = xmalloc_fgetline(fp)) != NULL) {
                p = skip_whitespace(buf);
-
                if (*p && (*p != '#')) {
                        bb_dump_add(dumper, p);
                }
@@ -131,7 +128,7 @@ int hexdump_main(int argc, char **argv)
 
        do {
                char *buf;
-               fp = xfopen(*argv, "r");
+               fp = xfopen_for_read(*argv);
  jump_in:
                while ((buf = xmalloc_fgetline(fp)) != NULL) {
                        p = buf;