mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
ITS#4111 fix mask_to_verbs return value
This commit is contained in:
parent
71514ffb92
commit
3200892a95
@ -853,18 +853,20 @@ verbs_to_mask(int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m) {
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
mask_to_verbs(slap_verbmasks *v, slap_mask_t m, BerVarray *bva) {
|
mask_to_verbs(slap_verbmasks *v, slap_mask_t m, BerVarray *bva) {
|
||||||
int i;
|
int i, rc = 1;
|
||||||
|
|
||||||
if (!m) return 1;
|
if (m) {
|
||||||
for (i=0; !BER_BVISNULL(&v[i].word); i++) {
|
for (i=0; !BER_BVISNULL(&v[i].word); i++) {
|
||||||
if (!v[i].mask) continue;
|
if (!v[i].mask) continue;
|
||||||
if (( m & v[i].mask ) == v[i].mask ) {
|
if (( m & v[i].mask ) == v[i].mask ) {
|
||||||
value_add_one( bva, &v[i].word );
|
value_add_one( bva, &v[i].word );
|
||||||
|
rc = 0;
|
||||||
m ^= v[i].mask;
|
m ^= v[i].mask;
|
||||||
if ( !m ) break;
|
if ( !m ) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
}
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user