Some more patchelttes from Larry Doolittle.
[oweals/busybox.git] / sed.c
diff --git a/sed.c b/sed.c
index 1c227704ecc7135500896918618a597510038039..47fb63712066a5f1a8e02133d7b9f8bbe06006f5 100644 (file)
--- a/sed.c
+++ b/sed.c
@@ -577,12 +577,7 @@ static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line)
                        break;
        }
 
-       /* if there's anything left of the line, print it */
-       if (*hackline)
-               puts(hackline);
-       /* otherwise, we need to print a newline */
-       else
-               printf("\n");
+       puts(hackline);
 
        /* cleanup */
        free(regmatch);
@@ -622,7 +617,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
                         *    flag exists in the first place.
                         */
 
-                       /* if the user specified that they didn't want anything printed (i.e. a -n
+                       /* if the user specified that they didn't want anything printed (i.e., a -n
                         * flag and no 'p' flag after the s///), then there's really no point doing
                         * anything here. */
                        if (be_quiet && !sed_cmd->sub_p)