]> granicus.if.org Git - shadow/commitdiff
Replace printf by puts for fixed strings. This would avoid issues caused
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 24 Jan 2008 21:07:14 +0000 (21:07 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 24 Jan 2008 21:07:14 +0000 (21:07 +0000)
by formats introduced in translated strings.

ChangeLog
lib/getdef.c
libmisc/addgrps.c
libmisc/age.c
libmisc/env.c
libmisc/limits.c
libmisc/yesno.c

index 91c52c34e771cf556acf3daaa8905cf395839cb7..c2c1599865c66282e255b79a7c950b242047ef93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,9 +5,10 @@
        src/userdel.c, src/lastlog.c, src/groupmems.c, src/usermod.c,
        src/expiry.c, src/groupdel.c, src/useradd.c, src/su.c,
        src/groupmod.c, src/passwd.c, src/groupadd.c, src/login.c,
-       src/suauth.c, src/faillog.c, src/id.c: Replace
-       printf by puts for fixed strings. This would avoid issues caused
-       by formats introduced in translated strings.
+       src/suauth.c, src/faillog.c, src/id.c, libmisc/limits.c,
+       libmisc/addgrps.c, libmisc/env.c, libmisc/age.c, libmisc/yesno.c,
+       lib/getdef.c: Replace printf by puts for fixed strings. This would
+       avoid issues caused by formats introduced in translated strings.
 
 2008-01-23  Nicolas François  <nicolas.francois@centraliens.net>
 
index 02f2ecafe90d1d8aae83ea597ca918d625e9ce23..4d8603634d0e4f91f8d9f20af5025c44a9020296 100644 (file)
@@ -257,8 +257,8 @@ int putdef_str (const char *name, const char *value)
         * Save off the value.
         */
        if ((cp = strdup (value)) == NULL) {
-               fprintf (stderr,
-                        _("Could not allocate space for config info.\n"));
+               fputs (_("Could not allocate space for config info.\n"),
+                      stderr);
                SYSLOG ((LOG_ERR, "could not allocate space for config info"));
                return -1;
        }
index 1bf02e61aa2adad395a37f0c619ad09c8a7598e9..f9e7e1c17e656f98e6a695b25f956ecd95f0f6b8 100644 (file)
@@ -64,7 +64,7 @@ int add_groups (const char *list)
                        continue;
 
                if (ngroups >= sysconf (_SC_NGROUPS_MAX)) {
-                       fprintf (stderr, _("Warning: too many groups\n"));
+                       fputs (_("Warning: too many groups\n"), stderr);
                        break;
                }
                tmp = (gid_t *) realloc (grouplist, (ngroups + 1) * sizeof (GETGROUPS_T));
index 070f0169daf48f786567a200809f15193ddc77af..3d1cbafa2894cd30f995ef9b549975024d1151f7 100644 (file)
@@ -68,13 +68,13 @@ int expire (const struct passwd *pw, const struct spwd *sp)
        case 0:
                return 0;
        case 1:
-               printf (_("Your password has expired."));
+               puts (_("Your password has expired."));
                break;
        case 2:
-               printf (_("Your password is inactive."));
+               puts (_("Your password is inactive."));
                break;
        case 3:
-               printf (_("Your login has expired."));
+               puts (_("Your login has expired."));
                break;
        }
 
@@ -168,8 +168,8 @@ void agecheck (const struct passwd *pw, const struct spwd *sp)
                                ("Your password will expire in %ld days.\n"),
                                remain);
                else if (remain == 1)
-                       printf (_("Your password will expire tomorrow.\n"));
+                       puts (_("Your password will expire tomorrow.\n"));
                else if (remain == 0)
-                       printf (_("Your password will expire today.\n"));
+                       puts (_("Your password will expire today.\n"));
        }
 }
index 5cf1227085cd261a435eb145b334df38faf5e846..d68706f8ffd56d12ee3cf360efca14cc6a8ed270 100644 (file)
@@ -152,7 +152,7 @@ void addenv (const char *string, const char *value)
                                environ = __newenvp;
                        newenvp = __newenvp;
                } else {
-                       fprintf (stderr, _("Environment overflow\n"));
+                       fputs (_("Environment overflow\n"), stderr);
                        free (newenvp[--newenvc]);
                }
        }
index c211f58b6933cc3a2f28e90091c9d895631e381c..d86a0b434d55a5c438d6795385d23aea161e666a 100644 (file)
@@ -410,7 +410,7 @@ void setup_limits (const struct passwd *info)
                if (info->pw_uid != 0)
                        if (setup_user_limits (info->pw_name) &
                            LOGIN_ERROR_LOGIN) {
-                               fprintf (stderr, _("Too many logins.\n"));
+                               fputs (_("Too many logins.\n"), stderr);
                                sleep (2);
                                exit (1);
                        }
index bac10741f7776d8ed051db806145ff14eea16902..1689083514a84008b7466957f588d7ba55f89396 100644 (file)
@@ -55,7 +55,7 @@ int yes_or_no (int read_only)
         * In read-only mode all questions are answered "no".
         */
        if (read_only) {
-               printf (_("No\n"));
+               puts (_("No\n"));
                return 0;
        }