diff options
-rw-r--r-- | editors/sed.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/editors/sed.c b/editors/sed.c index 7af8f867a..28f0c7318 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1333,6 +1333,7 @@ int sed_main(int argc UNUSED_PARAM, char **argv) | |||
1333 | if (opt & OPT_in_place) | 1333 | if (opt & OPT_in_place) |
1334 | bb_error_msg_and_die(bb_msg_requires_arg, "-i"); | 1334 | bb_error_msg_and_die(bb_msg_requires_arg, "-i"); |
1335 | add_input_file(stdin); | 1335 | add_input_file(stdin); |
1336 | process_files(); | ||
1336 | } else { | 1337 | } else { |
1337 | int i; | 1338 | int i; |
1338 | FILE *file; | 1339 | FILE *file; |
@@ -1378,13 +1379,9 @@ int sed_main(int argc UNUSED_PARAM, char **argv) | |||
1378 | free(G.outname); | 1379 | free(G.outname); |
1379 | G.outname = NULL; | 1380 | G.outname = NULL; |
1380 | } | 1381 | } |
1381 | /* Here, to handle "sed 'cmds' nonexistent_file" case we did: | 1382 | if (G.input_file_count > G.current_input_file) |
1382 | * if (G.current_input_file >= G.input_file_count) | 1383 | process_files(); |
1383 | * return status; | ||
1384 | * but it's not needed since process_files() works correctly | ||
1385 | * in this case too. */ | ||
1386 | } | 1384 | } |
1387 | process_files(); | ||
1388 | 1385 | ||
1389 | return status; | 1386 | return status; |
1390 | } | 1387 | } |