From f7122499a64dfe6f797e8ef5214481bf00322043 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 25 May 2008 23:50:03 +0000 Subject: [PATCH] Avoid implicit conversion of chars to booleans. --- ChangeLog | 5 +++++ libmisc/setupenv.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 231e7c9d..a636ba3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-26 Nicolas François + + * libmisc/setupenv.c: Avoid implicit conversion of chars to + booleans. + 2008-05-26 Nicolas François * libmisc/copydir.c: selinux_checked, selinux_enabled, and set_orig diff --git a/libmisc/setupenv.c b/libmisc/setupenv.c index 8147d1d0..8eb383d0 100644 --- a/libmisc/setupenv.c +++ b/libmisc/setupenv.c @@ -229,7 +229,7 @@ void setup_env (struct passwd *info) * Create the SHELL environmental variable and export it. */ - if (info->pw_shell == (char *) 0 || !*info->pw_shell) { + if ((NULL == info->pw_shell) || ('\0' == *info->pw_shell)) { static char temp_pw_shell[] = "/bin/sh"; info->pw_shell = temp_pw_shell;