Fix some warnings from pvs-studio
This commit is contained in:
@@ -55,7 +55,7 @@ linux_audit_open(void)
|
||||
if (errno == EINVAL || errno == EPROTONOSUPPORT || errno == EAFNOSUPPORT)
|
||||
au_fd = AUDIT_NOT_CONFIGURED;
|
||||
else
|
||||
sudo_warn(U_("unable to open audit system"));
|
||||
sudo_warn("%s", U_("unable to open audit system"));
|
||||
} else {
|
||||
(void)fcntl(au_fd, F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ linux_audit_command(char *const argv[], int result)
|
||||
/* Log command, ignoring ECONNREFUSED on error. */
|
||||
if (audit_log_user_command(au_fd, AUDIT_USER_CMD, command, NULL, result) <= 0) {
|
||||
if (errno != ECONNREFUSED) {
|
||||
sudo_warn(U_("unable to send audit message"));
|
||||
sudo_warn("%s", U_("unable to send audit message"));
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user