summaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-10-08 03:06:04 +0200
committerDenys Vlasenko2009-10-08 03:06:04 +0200
commit4ac9819263114edb9b5b638ffa6d2e41a4bb46e7 (patch)
treef0c5bc9c7a2bf3a384b85350bfe4c9ca5ec4858f /editors/sed.c
parent5b807cd5acd1f27b3e7aa36aac2728be27c5907c (diff)
downloadbusybox-4ac9819263114edb9b5b638ffa6d2e41a4bb46e7.zip
busybox-4ac9819263114edb9b5b638ffa6d2e41a4bb46e7.tar.gz
apply post-1.15.1 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 8b4f60a..3f044ca 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -690,10 +690,8 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line_p)
if (sed_cmd->which_match)
break;
- if (*line == '\0')
- break;
//maybe (G.regmatch[0].rm_eo ? REG_NOTBOL : 0) instead of unconditional REG_NOTBOL?
- } while (regexec(current_regex, line, 10, G.regmatch, REG_NOTBOL) != REG_NOMATCH);
+ } while (*line && regexec(current_regex, line, 10, G.regmatch, REG_NOTBOL) != REG_NOMATCH);
/* Copy rest of string into output pipeline */
while (1) {