From: Todd C. Miller Date: Mon, 29 Jan 2018 18:50:56 +0000 (-0700) Subject: Quiet a clang analyzer false positive. X-Git-Tag: SUDO_1_8_23^2~164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7766278031ef3ce6b6bf06ec22256dda2f74fff6;p=sudo Quiet a clang analyzer false positive. --- diff --git a/plugins/sudoers/cvtsudoers_ldif.c b/plugins/sudoers/cvtsudoers_ldif.c index d2ca2e494..57f52374a 100644 --- a/plugins/sudoers/cvtsudoers_ldif.c +++ b/plugins/sudoers/cvtsudoers_ldif.c @@ -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"));