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

Fix shadowed variable warning.

This commit is contained in:
Todd C. Miller
2022-08-20 14:36:29 -06:00
parent c948717bd4
commit a3a181df07

View File

@@ -96,10 +96,10 @@ main(int argc, char *argv[], char *envp[])
/* If argv[1] is --chdir=dir, change to specified dir. */
if (strncmp(argv[1], "--chdir=", sizeof("--chdir=") - 1) == 0) {
const char *cp = argv[1] + sizeof("--chdir=") - 1;
bool cwd_optional = false;
/* If run dir starts with a '+', ignore chdir(2) failure. */
cp = argv[1] + sizeof("--chdir=") - 1;
if (*cp == '+') {
cwd_optional = true;
cp++;