X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util-linux%2Fhexdump.c;h=48edd70a930e2acf5ac45f68be104e288f35924e;hb=7307e06122997f3d5e0108cd1bab4b11a1d5ebdc;hp=4d2b0592ba3e394671c68c1462a7ae918ec367a0;hpb=55f7912ddaea7c21068a48841a6eb933e5f286ee;p=oweals%2Fbusybox.git diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index 4d2b0592b..48edd70a9 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c @@ -14,18 +14,15 @@ /* 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;