2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +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

@@ -400,8 +400,10 @@ sudo_putenv(char *str, bool dupcheck, bool overwrite)
ret = sudo_putenv_nodebug(str, dupcheck, overwrite);
if (ret == -1) {
#ifdef ENV_DEBUG
if (env.envp[env.env_len] != NULL)
sudo_warnx(U_("sudo_putenv: corrupted envp, length mismatch"));
if (env.envp[env.env_len] != NULL) {
sudo_warnx("%s",
U_("sudo_putenv: corrupted envp, length mismatch"));
}
#endif
}
debug_return_int(ret);
@@ -1128,7 +1130,7 @@ rebuild_env(void)
debug_return_bool(true);
bad:
sudo_warn(U_("unable to rebuild the environment"));
sudo_warn("%s", U_("unable to rebuild the environment"));
debug_return_bool(false);
}