mirror of
https://github.com/sheumann/hush.git
synced 2024-12-30 05:29:47 +00:00
sed: trivial code shrink -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
020465218c
commit
eb08b6ed5c
@ -1333,7 +1333,6 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (opt & OPT_in_place)
|
||||
bb_error_msg_and_die(bb_msg_requires_arg, "-i");
|
||||
add_input_file(stdin);
|
||||
process_files();
|
||||
} else {
|
||||
int i;
|
||||
FILE *file;
|
||||
@ -1379,9 +1378,13 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
|
||||
free(G.outname);
|
||||
G.outname = NULL;
|
||||
}
|
||||
if (G.input_file_count > G.current_input_file)
|
||||
process_files();
|
||||
/* Here, to handle "sed 'cmds' nonexistent_file" case we did:
|
||||
* if (G.current_input_file >= G.input_file_count)
|
||||
* return status;
|
||||
* but it's not needed since process_files() works correctly
|
||||
* in this case too. */
|
||||
}
|
||||
process_files();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user