]> granicus.if.org Git - shadow/commitdiff
* libmisc/obscure.c: Change some int to size_t.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 24 Apr 2009 23:04:27 +0000 (23:04 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 24 Apr 2009 23:04:27 +0000 (23:04 +0000)
ChangeLog
libmisc/obscure.c

index f840dab91e7085590fc5dcb1916ffbf2523949fd..cc8bb3f57339635ec7e57938900cb6baab9e4aaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-25  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * libmisc/obscure.c: Change some int to size_t.
+
 2009-04-25  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/console.c: Use a less disturbing construct for splint.
index a9b9e0e31d1ebe6da50f9b63fe83bb4cdfca25a5..7088662dffe972bf88d4ba44dc4d09621fa7f1b5 100644 (file)
@@ -52,7 +52,7 @@
  */
 static bool palindrome (unused const char *old, const char *new)
 {
-       int i, j;
+       size_t i, j;
 
        i = strlen (new);
 
@@ -223,7 +223,7 @@ static const char *password_check (const char *old, const char *new,
 static const char *obscure_msg (const char *old, const char *new,
                                    const struct passwd *pwdp)
 {
-       int maxlen, oldlen, newlen;
+       size_t maxlen, oldlen, newlen;
        char *new1, *old1;
        const char *msg;
        char *result;
@@ -231,7 +231,7 @@ static const char *obscure_msg (const char *old, const char *new,
        oldlen = strlen (old);
        newlen = strlen (new);
 
-       if (newlen < getdef_num ("PASS_MIN_LEN", 0)) {
+       if (newlen < (size_t) getdef_num ("PASS_MIN_LEN", 0)) {
                return _("too short");
        }
 
@@ -271,7 +271,7 @@ static const char *obscure_msg (const char *old, const char *new,
                }
 
        }
-       maxlen = getdef_num ("PASS_MAX_LEN", 8);
+       maxlen = (size_t) getdef_num ("PASS_MAX_LEN", 8);
        if (   (oldlen <= maxlen)
            && (newlen <= maxlen)) {
                return NULL;