aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-19 17:50:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-19 17:50:23 +0200
commite329089c62ed813e97344f8c61d7dc34221fd5ee (patch)
tree37f70b9da97e9714227b536811be47f4f7fd3959
parentc2c7aa4b0d16049322ca2ebc69ca1093f6944e3a (diff)
downloadbusybox-w32-e329089c62ed813e97344f8c61d7dc34221fd5ee.tar.gz
busybox-w32-e329089c62ed813e97344f8c61d7dc34221fd5ee.tar.bz2
busybox-w32-e329089c62ed813e97344f8c61d7dc34221fd5ee.zip
Revert "sed: trivial code shrink"
This reverts commit c2c7aa4b0d16049322ca2ebc69ca1093f6944e3a.
-rw-r--r--editors/sed.c9
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}