diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 44c2782933..d575e245bc 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -672,8 +672,8 @@ compare_csns( struct sync_cookie *sc1, struct sync_cookie *sc2, int *which ) return -1; } - for (i=0; !BER_BVISNULL( &sc1->ctxcsn[i] ); i++) { - for (j=0; !BER_BVISNULL( &sc2->ctxcsn[j] ); j++) { + for (i=0; inumcsns; i++) { + for (j=0; inumcsns; j++) { if ( sc1->sids[i] != sc2->sids[j] ) continue; value_match( &match, slap_schema.si_ad_entryCSN,