aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c
index e7b2c214a..9b360b669 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -359,7 +359,8 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
359 continue; 359 continue;
360 } 360 }
361 /* Skip spaces */ 361 /* Skip spaces */
362 if (isspace(substr[idx])) continue; 362 if (isspace(substr[idx]))
363 continue;
363 364
364 switch (substr[idx]) { 365 switch (substr[idx]) {
365 /* Replace all occurrences */ 366 /* Replace all occurrences */
@@ -417,8 +418,7 @@ static const char *parse_cmd_args(sed_cmd_t *sed_cmd, const char *cmdstr)
417 /* handle edit cmds: (a)ppend, (i)nsert, and (c)hange */ 418 /* handle edit cmds: (a)ppend, (i)nsert, and (c)hange */
418 else if (strchr("aic", sed_cmd->cmd)) { 419 else if (strchr("aic", sed_cmd->cmd)) {
419 if ((sed_cmd->end_line || sed_cmd->end_match) && sed_cmd->cmd != 'c') 420 if ((sed_cmd->end_line || sed_cmd->end_match) && sed_cmd->cmd != 'c')
420 bb_error_msg_and_die 421 bb_error_msg_and_die("only a beginning address can be specified for edit commands");
421 ("only a beginning address can be specified for edit commands");
422 for (;;) { 422 for (;;) {
423 if (*cmdstr == '\n' || *cmdstr == '\\') { 423 if (*cmdstr == '\n' || *cmdstr == '\\') {
424 cmdstr++; 424 cmdstr++;