From: Todd C. Miller Date: Thu, 17 Nov 2016 17:27:26 +0000 (-0700) Subject: Fix sign compare warning. X-Git-Tag: SUDO_1_8_19^2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0cde3f5de4d128c6a701ec6586bd55e2d3719b63;p=sudo Fix sign compare warning. --- diff --git a/plugins/sudoers/auth/rfc1938.c b/plugins/sudoers/auth/rfc1938.c index e1474c6ef..a0a5eca9c 100644 --- a/plugins/sudoers/auth/rfc1938.c +++ b/plugins/sudoers/auth/rfc1938.c @@ -60,7 +60,7 @@ sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth) char challenge[256]; size_t challenge_len; static char *orig_prompt = NULL, *new_prompt = NULL; - static int op_len, np_size; + static size_t op_len, np_size; static struct RFC1938 rfc1938; debug_decl(sudo_rfc1938_setup, SUDOERS_DEBUG_AUTH) @@ -116,7 +116,7 @@ sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth) if (def_long_otp_prompt) (void) snprintf(new_prompt, np_size, "%s\n%s", challenge, orig_prompt); else - (void) snprintf(new_prompt, np_size, "%.*s [ %s ]:", op_len, + (void) snprintf(new_prompt, np_size, "%.*s [ %s ]:", (int)op_len, orig_prompt, challenge); *promptp = new_prompt;