]> git.sur5r.net Git - openldap/commitdiff
Lint removal: signed i < unsigned j
authorKurt Zeilenga <kurt@openldap.org>
Tue, 27 Apr 1999 05:19:32 +0000 (05:19 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 27 Apr 1999 05:19:32 +0000 (05:19 +0000)
clients/tools/ldappasswd.c
libraries/liblber/decode.c
libraries/liblber/io.c
libraries/libldap/cache.c

index d86df2a96477c2555d9ed8fe8b7f02bc3c19bcf8..133ed43338183af9fa4217397b1a4db5d916556e 100644 (file)
@@ -146,7 +146,7 @@ gen_pass (unsigned int len)
 {
        static const unsigned char autogen[] =
                "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890.,";
-       int             i;
+       unsigned int i;
        Salt            salt;
 
        salt.salt = NULL;
index bef41fa7540ac08061d28b64ef95e0f37b825492..b0ca907ff0b119ecbf443b23cee4423c4beaacd8 100644 (file)
@@ -101,7 +101,7 @@ ber_skip_tag( BerElement *ber, unsigned long *len )
                return( LBER_DEFAULT );
        if ( lc & 0x80 ) {
                noctets = (lc & 0x7f);
-               if ( noctets > sizeof(unsigned long) )
+               if ( (unsigned) noctets > sizeof(unsigned long) )
                        return( LBER_DEFAULT );
                diff = sizeof(unsigned long) - noctets;
                if ( ber_read( ber, (char *) &netlen + diff, noctets )
@@ -142,7 +142,7 @@ ber_getnint( BerElement *ber, long *num, int len )
         * extend after we read it in.
         */
 
-       if ( len > sizeof(long) )
+       if ( (unsigned) len > sizeof(long) )
                return( -1 );
 
        netnum = 0;
@@ -154,7 +154,7 @@ ber_getnint( BerElement *ber, long *num, int len )
         /* sign extend if necessary */
         p = (char *) &netnum;
         sign = (0x80 & *(p+diff) );
-        if ( sign && len < sizeof(long) ) {
+        if ( sign && ((unsigned) len < sizeof(long)) ) {
                 for ( i = 0; i < diff; i++ ) {
                         *(p+i) = (unsigned char) 0xff;
                }
index 92d4242418ad8645d66486ede07b43bb8f22d20a..085f1a9bc599a93560e67397bf061116f0a3d4b5 100644 (file)
@@ -442,7 +442,7 @@ get_lenbyte:
                        return LBER_DEFAULT;
                if (c & 0x80) {
                        int len = c & 0x7f;
-                       if ( (len==0) || ( len>sizeof( ber->ber_len ) ) ) {
+                       if ( (len==0) || ((unsigned) len>sizeof( ber->ber_len ) ) ) {
                                errno = ERANGE;
                                return LBER_DEFAULT;
                        }
index d97a362d1884c9dc6288e0337f7f79c4d1ce7fd8..936488a3a9df8e56f46b40491af5749757192bf4 100644 (file)
@@ -623,7 +623,7 @@ check_cache_memused( LDAPCache *lc )
        Debug( LDAP_DEBUG_TRACE, "check_cache_memused: %ld bytes in use (%ld max)\n",
            lc->lc_memused, lc->lc_maxmem, 0 );
 
-       if ( lc->lc_maxmem <= sizeof( LDAPCache )
+       if ( (unsigned) lc->lc_maxmem <= sizeof( LDAPCache )
            || lc->lc_memused <= lc->lc_maxmem * SIZE_FACTOR ) {
                return;
        }