aboutsummaryrefslogtreecommitdiff
path: root/editors
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 /editors
parentc2c7aa4b0d16049322ca2ebc69ca1093f6944e3a (diff)
downloadbusybox-e329089c62ed813e97344f8c61d7dc34221fd5ee.tar.gz
Revert "sed: trivial code shrink"
This reverts commit c2c7aa4b0d16049322ca2ebc69ca1093f6944e3a.
Diffstat (limited to 'editors')
-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)
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;
@@ -1378,13 +1379,9 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
free(G.outname);
G.outname = NULL;
}
- /* 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. */
+ if (G.input_file_count > G.current_input_file)
+ process_files();
}
- process_files();
return status;
}