From c56d59c90b0708aa7b7efc4367b2e5786cdfec85 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sat, 21 Aug 2010 19:22:32 +0000 Subject: [PATCH] Fix additional const issues. --- ChangeLog | 5 +++-- libmisc/obscure.c | 2 +- libmisc/setugid.c | 2 +- libmisc/setupenv.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index eefafd1d..3e2bfb82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,9 +13,10 @@ * libmisc/console.c, libmisc/motd.c, libmisc/setupenv.c, libmisc/sulog.c, libmisc/hushed.c, libmisc/failure.c, - libmisc/loginprompt.c, libmisc/ttytype.c, + libmisc/loginprompt.c, libmisc/ttytype.c, libmisc/obscure.c, libmisc/pam_pass_non_interractive.c, src/userdel.c, src/login.c, - lib/commonio.c, lib/commonio.h: Fix some const issues. + lib/commonio.c, lib/commonio.h, libmisc/setugid.c, + libmisc/setupenv.c: Fix some const issues. * libmisc/motd.c: Avoid multi-statements lines. * libmisc/motd.c: Support long MOTD_FILE. * libmisc/list.c, lib/prototypes.h: Revert previous change. diff --git a/libmisc/obscure.c b/libmisc/obscure.c index 7088662d..f3e27548 100644 --- a/libmisc/obscure.c +++ b/libmisc/obscure.c @@ -226,7 +226,7 @@ static const char *obscure_msg (const char *old, const char *new, size_t maxlen, oldlen, newlen; char *new1, *old1; const char *msg; - char *result; + const char *result; oldlen = strlen (old); newlen = strlen (new); diff --git a/libmisc/setugid.c b/libmisc/setugid.c index 997095e9..9e23db0c 100644 --- a/libmisc/setugid.c +++ b/libmisc/setugid.c @@ -131,7 +131,7 @@ int setup_uid_gid (const struct passwd *info) #if defined (HAVE_INITGROUPS) && ! defined (USE_PAM) if (is_console) { - char *cp = getdef_str ("CONSOLE_GROUPS"); + const char *cp = getdef_str ("CONSOLE_GROUPS"); if ((NULL != cp) && (add_groups (cp) != 0)) { perror ("Warning: add_groups"); diff --git a/libmisc/setupenv.c b/libmisc/setupenv.c index b9489dc0..f8f220f9 100644 --- a/libmisc/setupenv.c +++ b/libmisc/setupenv.c @@ -200,7 +200,7 @@ static void read_env_file (const char *filename) void setup_env (struct passwd *info) { #ifndef USE_PAM - char *envf; + const char *envf; #endif const char *cp;