Avoid implicit conversion of chars to booleans.

This commit is contained in:
nekral-guest 2008-05-25 23:50:03 +00:00
parent cc7ac94641
commit f7122499a6
2 changed files with 6 additions and 1 deletions

View File

@ -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> 2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/copydir.c: selinux_checked, selinux_enabled, and set_orig * libmisc/copydir.c: selinux_checked, selinux_enabled, and set_orig

View File

@ -229,7 +229,7 @@ void setup_env (struct passwd *info)
* Create the SHELL environmental variable and export it. * 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"; static char temp_pw_shell[] = "/bin/sh";
info->pw_shell = temp_pw_shell; info->pw_shell = temp_pw_shell;