]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
vipw: print only one new line when asking about shadow file
authorSami Kerola <kerolasa@iki.fi>
Mon, 14 Mar 2016 21:38:30 +0000 (21:38 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Mar 2016 13:12:31 +0000 (14:12 +0100)
Commit 11b86e1733 changed printf() to puts() in favour of more simple
function, but forgot that puts() adds a new line to end of string.  That new
line is neither needed, or expected, so use fputs() that is both a simple
printing function and comes without new line side effect.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/vipw.c

index b8e5b47c155e3a23af113dd1cc25921b597be277..0438656826cccae24814a0577c068b9fa7c21e51 100644 (file)
@@ -343,9 +343,9 @@ int main(int argc, char *argv[])
        if (access(orig_file, F_OK) == 0) {
                char response[80];
 
-               puts((program == VIGR)
+               fputs((program == VIGR)
                       ? _("You are using shadow groups on this system.\n")
-                      : _("You are using shadow passwords on this system.\n"));
+                      : _("You are using shadow passwords on this system.\n"), stdout);
 
                /* TRANSLATORS: this program uses for y and n rpmatch(3),
                 * which means they can be translated. */