mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
elinated compiler warning
This commit is contained in:
5
sudo.c
5
sudo.c
@@ -493,7 +493,8 @@ static void rmenv(envp, s, len)
|
||||
static void add_env()
|
||||
{
|
||||
char *uidstr;
|
||||
int len, n;
|
||||
int len;
|
||||
uid_t n;
|
||||
|
||||
/* add the SUDO_USER envariable */
|
||||
if (sudo_setenv("SUDO_USER", user)) {
|
||||
@@ -503,7 +504,7 @@ static void add_env()
|
||||
}
|
||||
|
||||
/* add the SUDO_UID envariable */
|
||||
for (len = 1 + ((int)uid < 0), n = (int)uid; (n = n / 10) != 0; )
|
||||
for (len = 2, n = uid; (int) (n = n / 10) != 0; )
|
||||
++len;
|
||||
|
||||
uidstr = (char *) malloc(len+1);
|
||||
|
Reference in New Issue
Block a user