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:
@@ -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++;
|
||||
|
Reference in New Issue
Block a user