]> granicus.if.org Git - shadow/commitdiff
Avoid ?: construct without the middle term.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 1 Jan 2008 14:34:07 +0000 (14:34 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 1 Jan 2008 14:34:07 +0000 (14:34 +0000)
ChangeLog
src/useradd.c

index 2cd0a1fe89c2731189b16dfee07a7154f256296f..aeb2e8d09ae51819f63a04d70266866e20219316 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-01  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/useradd.c: Avoid ?: construct without the middle term.
+
 2008-01-01  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/copydir.c, src/usermod.c, lib/prototypes.h: The uid and
index e591e1c4b31b22d15012f060379cdf234e352ea7..5ae62d6d21a82c436857cbd1e31d83380a4d591c 100644 (file)
@@ -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);