]> granicus.if.org Git - sudo/commitdiff
Quiet a clang analyzer false positive.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 29 Jan 2018 18:50:56 +0000 (11:50 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 29 Jan 2018 18:50:56 +0000 (11:50 -0700)
plugins/sudoers/cvtsudoers_ldif.c

index d2ca2e4946ad5e9e8edb92863b1502e615f2ac26..57f52374a49c84ae4410fdd1f01f6fd07e1653f4 100644 (file)
@@ -402,7 +402,7 @@ print_userspec_ldif(FILE *fp, struct userspec *us, const char *base)
             * If more than one user is listed, just use the first one.
             */
            m = TAILQ_FIRST(&us->users);
-           cn = user_to_cn(m->name ? m->name : "ALL");
+           cn = user_to_cn(m->type == ALL ? "ALL" : m->name);
            if (cn == NULL) {
                sudo_fatalx(U_("%s: %s"), __func__,
                    U_("unable to allocate memory"));