From c727d5caf7578337fb3917ae72204c70797a4775 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 15 Aug 2007 20:09:06 +0000 Subject: [PATCH] ITS#4627 fix tool_entry_next --- servers/slapd/back-ldif/ldif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.5