diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-19 17:51:06 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-19 17:51:06 +0200 |
commit | eb08b6ed5cc7bb764658cd7a3b829e2b3aac4abc (patch) | |
tree | c1568f8427244069d7a62bf1fc220cd83e0d7703 | |
parent | 020465218ccff1195a47a890037db37d0395c9d9 (diff) | |
download | busybox-w32-eb08b6ed5cc7bb764658cd7a3b829e2b3aac4abc.tar.gz busybox-w32-eb08b6ed5cc7bb764658cd7a3b829e2b3aac4abc.tar.bz2 busybox-w32-eb08b6ed5cc7bb764658cd7a3b829e2b3aac4abc.zip |
sed: trivial code shrink -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | editors/sed.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c index 28f0c7318..7af8f867a 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1333,7 +1333,6 @@ 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(); | ||
1337 | } else { | 1336 | } else { |
1338 | int i; | 1337 | int i; |
1339 | FILE *file; | 1338 | FILE *file; |
@@ -1379,9 +1378,13 @@ int sed_main(int argc UNUSED_PARAM, char **argv) | |||
1379 | free(G.outname); | 1378 | free(G.outname); |
1380 | G.outname = NULL; | 1379 | G.outname = NULL; |
1381 | } | 1380 | } |
1382 | if (G.input_file_count > G.current_input_file) | 1381 | /* Here, to handle "sed 'cmds' nonexistent_file" case we did: |
1383 | process_files(); | 1382 | * if (G.current_input_file >= G.input_file_count) |
1383 | * return status; | ||
1384 | * but it's not needed since process_files() works correctly | ||
1385 | * in this case too. */ | ||
1384 | } | 1386 | } |
1387 | process_files(); | ||
1385 | 1388 | ||
1386 | return status; | 1389 | return status; |
1387 | } | 1390 | } |