Convert some bitwise AND to ISSET

This commit is contained in:
Todd C. Miller
2004-10-26 22:39:35 +00:00
parent 7062fd28fd
commit 4549980664

View File

@@ -367,9 +367,9 @@ log_error(va_alist)
evasprintf(&message, fmt, ap); evasprintf(&message, fmt, ap);
va_end(ap); va_end(ap);
if (flags & MSG_ONLY) if (ISSET(flags, MSG_ONLY))
logline = message; logline = message;
else if (flags & USE_ERRNO) { else if (ISSET(flags, USE_ERRNO)) {
if (user_args) { if (user_args) {
easprintf(&logline, easprintf(&logline,
"%s: %s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s %s", "%s: %s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s %s",
@@ -396,7 +396,7 @@ log_error(va_alist)
* Tell the user. * Tell the user.
*/ */
if (!ISSET(flags, NO_STDERR)) { if (!ISSET(flags, NO_STDERR)) {
if (flags & USE_ERRNO) if (ISSET(flags, USE_ERRNO))
warn("%s", message); warn("%s", message);
else else
warnx("%s", message); warnx("%s", message);
@@ -405,7 +405,7 @@ log_error(va_alist)
/* /*
* Send a copy of the error via mail. * Send a copy of the error via mail.
*/ */
if (!(flags & NO_MAIL)) if (!ISSET(flags, NO_MAIL))
send_mail(logline); send_mail(logline);
/* /*
@@ -420,7 +420,7 @@ log_error(va_alist)
if (logline != message) if (logline != message)
free(logline); free(logline);
if (!(flags & NO_EXIT)) if (!ISSET(flags, NO_EXIT))
exit(1); exit(1);
} }