]> git.sur5r.net Git - openldap/commitdiff
ITS#4627 fix tool_entry_next
authorHoward Chu <hyc@openldap.org>
Wed, 15 Aug 2007 20:09:06 +0000 (20:09 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 15 Aug 2007 20:09:06 +0000 (20:09 +0000)
servers/slapd/back-ldif/ldif.c

index d598c9cd30c85c78d41a4948c508b27a5be468c1..cdbb23be84f085c9e615ebabd0007005fe330402 100644 (file)
@@ -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