From: Todd C. Miller Date: Tue, 26 Oct 2004 22:39:35 +0000 (+0000) Subject: Convert some bitwise AND to ISSET X-Git-Tag: SUDO_1_7_0~849 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=454998066431e665f7084b90ac144946b78808c5;p=sudo Convert some bitwise AND to ISSET --- diff --git a/logging.c b/logging.c index fb9ff9cf0..703582cfe 100644 --- a/logging.c +++ b/logging.c @@ -367,9 +367,9 @@ log_error(va_alist) evasprintf(&message, fmt, ap); va_end(ap); - if (flags & MSG_ONLY) + if (ISSET(flags, MSG_ONLY)) logline = message; - else if (flags & USE_ERRNO) { + else if (ISSET(flags, USE_ERRNO)) { if (user_args) { easprintf(&logline, "%s: %s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s %s", @@ -396,7 +396,7 @@ log_error(va_alist) * Tell the user. */ if (!ISSET(flags, NO_STDERR)) { - if (flags & USE_ERRNO) + if (ISSET(flags, USE_ERRNO)) warn("%s", message); else warnx("%s", message); @@ -405,7 +405,7 @@ log_error(va_alist) /* * Send a copy of the error via mail. */ - if (!(flags & NO_MAIL)) + if (!ISSET(flags, NO_MAIL)) send_mail(logline); /* @@ -420,7 +420,7 @@ log_error(va_alist) if (logline != message) free(logline); - if (!(flags & NO_EXIT)) + if (!ISSET(flags, NO_EXIT)) exit(1); }