From: Howard Chu Date: Wed, 15 Aug 2007 20:09:06 +0000 (+0000) Subject: ITS#4627 fix tool_entry_next X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~214 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c727d5caf7578337fb3917ae72204c70797a4775;p=openldap ITS#4627 fix tool_entry_next --- diff --git a/servers/slapd/back-ldif/ldif.c b/servers/slapd/back-ldif/ldif.c index d598c9cd30..cdbb23be84 100644 --- a/servers/slapd/back-ldif/ldif.c +++ b/servers/slapd/back-ldif/ldif.c @@ -1174,11 +1174,10 @@ static int ldif_tool_entry_close(BackendDB * be) { static ID ldif_tool_entry_next(BackendDB *be) { struct ldif_info *li = (struct ldif_info *) be->be_private; - li->li_tool_current += 1; - if(li->li_tool_current > li->li_tool_cookie.eind) + if(li->li_tool_current >= li->li_tool_cookie.eind) return NOID; else - return li->li_tool_current; + return ++li->li_tool_current; } static ID