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 )
* extend after we read it in.
*/
- if ( len > sizeof(long) )
+ if ( (unsigned) len > sizeof(long) )
return( -1 );
netnum = 0;
/* 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;
}
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;
}