diff --git a/ChangeLog b/ChangeLog index 2cd0a1fe..aeb2e8d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-01 Nicolas François + + * src/useradd.c: Avoid ?: construct without the middle term. + 2008-01-01 Nicolas François * libmisc/copydir.c, src/usermod.c, lib/prototypes.h: The uid and diff --git a/src/useradd.c b/src/useradd.c index e591e1c4..5ae62d6d 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -1535,7 +1535,10 @@ static void create_mail (void) mode_t mode; if (strcasecmp (create_mail_spool, "yes") == 0) { - spool = getdef_str ("MAIL_DIR") ? : "/var/mail"; + spool = getdef_str ("MAIL_DIR"); + if (NULL == spool) { + spool = "/var/mail"; + } file = alloca (strlen (spool) + strlen (user_name) + 2); sprintf (file, "%s/%s", spool, user_name); fd = open (file, O_CREAT | O_WRONLY | O_TRUNC | O_EXCL, 0);