aboutsummaryrefslogtreecommitdiff
path: root/sed.c
diff options
context:
space:
mode:
Diffstat (limited to 'sed.c')
-rw-r--r--sed.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sed.c b/sed.c
index 21614fc77..1c227704e 100644
--- a/sed.c
+++ b/sed.c
@@ -579,7 +579,10 @@ static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line)
579 579
580 /* if there's anything left of the line, print it */ 580 /* if there's anything left of the line, print it */
581 if (*hackline) 581 if (*hackline)
582 fputs(hackline, stdout); 582 puts(hackline);
583 /* otherwise, we need to print a newline */
584 else
585 printf("\n");
583 586
584 /* cleanup */ 587 /* cleanup */
585 free(regmatch); 588 free(regmatch);
@@ -594,7 +597,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
594 switch (sed_cmd->cmd) { 597 switch (sed_cmd->cmd) {
595 598
596 case 'p': 599 case 'p':
597 fputs(line, stdout); 600 puts(line);
598 break; 601 break;
599 602
600 case 'd': 603 case 'd':