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",
* Tell the user.
*/
if (!ISSET(flags, NO_STDERR)) {
- if (flags & USE_ERRNO)
+ if (ISSET(flags, USE_ERRNO))
warn("%s", message);
else
warnx("%s", message);
/*
* Send a copy of the error via mail.
*/
- if (!(flags & NO_MAIL))
+ if (!ISSET(flags, NO_MAIL))
send_mail(logline);
/*
if (logline != message)
free(logline);
- if (!(flags & NO_EXIT))
+ if (!ISSET(flags, NO_EXIT))
exit(1);
}