mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 07:15:27 +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()
|
static void add_env()
|
||||||
{
|
{
|
||||||
char *uidstr;
|
char *uidstr;
|
||||||
int len, n;
|
int len;
|
||||||
|
uid_t n;
|
||||||
|
|
||||||
/* add the SUDO_USER envariable */
|
/* add the SUDO_USER envariable */
|
||||||
if (sudo_setenv("SUDO_USER", user)) {
|
if (sudo_setenv("SUDO_USER", user)) {
|
||||||
@@ -503,7 +504,7 @@ static void add_env()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* add the SUDO_UID envariable */
|
/* 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;
|
++len;
|
||||||
|
|
||||||
uidstr = (char *) malloc(len+1);
|
uidstr = (char *) malloc(len+1);
|
||||||
|
Reference in New Issue
Block a user