Commit 9a4eecb1 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Import slap_loglevel_get() integer fix (ITS#5035 part 4)

parent acc45c0a
......@@ -2102,8 +2102,7 @@ int
slap_loglevel_get( struct berval *s, int *l )
{
int rc;
unsigned long i;
slap_mask_t m;
slap_mask_t m, i;
if ( loglevel_ops == NULL ) {
loglevel_init();
......@@ -2113,12 +2112,10 @@ slap_loglevel_get( struct berval *s, int *l )
m |= loglevel_ops[ i ].mask;
}
m = ~m;
for ( i = 1; i <= ( 1 << ( sizeof( int ) * 8 - 1 ) ) && !( m & i ); i <<= 1 )
for ( i = 1; m & i; i <<= 1 )
;
if ( !( m & i ) ) {
if ( i == 0 ) {
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment