aboutsummaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 4e9babb9d..3ee8edc43 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -743,7 +743,7 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line_p)
743 */ 743 */
744 if (!G.regmatch[0].rm_so && !G.regmatch[0].rm_eo && match_count) { 744 if (!G.regmatch[0].rm_so && !G.regmatch[0].rm_eo && match_count) {
745 pipe_putc(*line++); 745 pipe_putc(*line++);
746 continue; 746 goto next;
747 } 747 }
748 748
749 match_count++; 749 match_count++;
@@ -755,7 +755,7 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line_p)
755 ) { 755 ) {
756 for (i = 0; i < G.regmatch[0].rm_eo; i++) 756 for (i = 0; i < G.regmatch[0].rm_eo; i++)
757 pipe_putc(*line++); 757 pipe_putc(*line++);
758 continue; 758 goto next;
759 } 759 }
760 760
761 /* print everything before the match */ 761 /* print everything before the match */
@@ -773,7 +773,7 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line_p)
773 /* if we're not doing this globally, get out now */ 773 /* if we're not doing this globally, get out now */
774 if (sed_cmd->which_match != 0) 774 if (sed_cmd->which_match != 0)
775 break; 775 break;
776 776 next:
777 if (*line == '\0') 777 if (*line == '\0')
778 break; 778 break;
779 779