mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
hexdump: fix "hexdump nonexistent_file" handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b741cd28d1
commit
6aca76d4d7
1 changed files with 2 additions and 2 deletions
|
|
@ -349,16 +349,16 @@ static NOINLINE int next(priv_dumper_t *dumper)
|
|||
|
||||
for (;;) {
|
||||
if (*dumper->argv) {
|
||||
dumper->next__done = statok = 1;
|
||||
if (!(freopen(*dumper->argv, "r", stdin))) {
|
||||
bb_simple_perror_msg(*dumper->argv);
|
||||
dumper->exitval = 1;
|
||||
++dumper->argv;
|
||||
continue;
|
||||
}
|
||||
dumper->next__done = statok = 1;
|
||||
} else {
|
||||
if (dumper->next__done)
|
||||
return 0;
|
||||
return 0; /* no next file */
|
||||
dumper->next__done = 1;
|
||||
statok = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue