]> granicus.if.org Git - sudo/commitdiff
Fix sign compare warning.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 17 Nov 2016 17:27:26 +0000 (10:27 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 17 Nov 2016 17:27:26 +0000 (10:27 -0700)
plugins/sudoers/auth/rfc1938.c

index e1474c6eff3caaf7c2ea6f499a14d7e1b83c7b27..a0a5eca9c5d930d39963ed1fe684bfa5ba4d2fe7 100644 (file)
@@ -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;