2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

Quiet sign comparision warnings.

This commit is contained in:
Todd C. Miller
2013-10-23 15:03:31 -06:00
parent f4d2978f30
commit 07a804caf3
27 changed files with 59 additions and 53 deletions

View File

@@ -110,14 +110,14 @@ expand_prompt(const char *old_prompt, const char *user, const char *host)
case 'h':
p++;
n = strlcpy(np, user_shost, np - endp);
if (n >= np - endp)
if (n >= (size_t)(np - endp))
goto oflow;
np += n;
continue;
case 'H':
p++;
n = strlcpy(np, user_host, np - endp);
if (n >= np - endp)
if (n >= (size_t)(np - endp))
goto oflow;
np += n;
continue;
@@ -129,21 +129,21 @@ expand_prompt(const char *old_prompt, const char *user, const char *host)
n = strlcpy(np, runas_pw->pw_name, np - endp);
else
n = strlcpy(np, user_name, np - endp);
if (n >= np - endp)
if (n >= (size_t)(np - endp))
goto oflow;
np += n;
continue;
case 'u':
p++;
n = strlcpy(np, user_name, np - endp);
if (n >= np - endp)
if (n >= (size_t)(np - endp))
goto oflow;
np += n;
continue;
case 'U':
p++;
n = strlcpy(np, runas_pw->pw_name, np - endp);
if (n >= np - endp)
if (n >= (size_t)(np - endp))
goto oflow;
np += n;
continue;