Lint removal: signed i < unsigned j

This commit is contained in:
Kurt Zeilenga 1999-04-27 05:19:32 +00:00
parent 504fac55c8
commit a80ff50a67
4 changed files with 6 additions and 6 deletions

View 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;

View 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;
}

View 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;
}

View 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;
}