2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Fix some warnings from pvs-studio

This commit is contained in:
Todd C. Miller
2020-08-12 13:45:09 -06:00
parent fb8ed8ba66
commit 961a4afe67
45 changed files with 330 additions and 314 deletions

View File

@@ -137,7 +137,7 @@ exec_setup(struct command_details *details, int errfd)
flags = LOGIN_SETRESOURCES|LOGIN_SETPRIORITY|LOGIN_SETUMASK;
}
if (setusercontext(lc, details->pw, details->pw->pw_uid, flags)) {
sudo_warn(U_("unable to set user context"));
sudo_warn("%s", U_("unable to set user context"));
if (details->pw->pw_uid != ROOT_UID)
goto done;
}
@@ -153,7 +153,7 @@ exec_setup(struct command_details *details, int errfd)
if (ISSET(details->flags, CD_SET_PRIORITY)) {
if (setpriority(PRIO_PROCESS, 0, details->priority) != 0) {
sudo_warn(U_("unable to set process priority"));
sudo_warn("%s", U_("unable to set process priority"));
goto done;
}
}