]> granicus.if.org Git - shadow/commitdiff
Avoid implicit conversion of chars to booleans.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 23:50:03 +0000 (23:50 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 23:50:03 +0000 (23:50 +0000)
ChangeLog
libmisc/setupenv.c

index 231e7c9d62ca78947be13f4cc80ebf441b8f4051..a636ba3bc30631d1578a9c331d4307ec26733353 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-26  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * libmisc/setupenv.c: Avoid implicit conversion of chars to
+       booleans.
+
 2008-05-26  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/copydir.c: selinux_checked, selinux_enabled, and set_orig
index 8147d1d0e911311b013eb43dba6124a61084b5ae..8eb383d010f5ed7606ee34f3992f3532d8390a02 100644 (file)
@@ -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;