]> git.sur5r.net Git - openldap/commitdiff
ITS#7542, more for ITS#7432
authorHoward Chu <hyc@openldap.org>
Mon, 18 Mar 2013 18:43:47 +0000 (11:43 -0700)
committerHoward Chu <hyc@openldap.org>
Mon, 18 Mar 2013 18:43:47 +0000 (11:43 -0700)
typos in quicksort

servers/slapd/back-mdb/idl.c
servers/slapd/modify.c

index eee2afc670aec0a9e2a83c53b273815dac689eef..9260d2be9adb590d38d1df093abab423c0eb7d46 100644 (file)
@@ -1074,7 +1074,7 @@ mdb_idl_sort( ID *ids, ID *tmp )
                        ids[l+1] = ids[j];
                        ids[j] = a;
                        jstack += 2;
-                       if (ir-i+1 >= j-1) {
+                       if (ir-i+1 >= j-l) {
                                istack[jstack] = ir;
                                istack[jstack-1] = i;
                                ir = j-1;
index 7b82133dd8fdd09a93fd5fe14caac8fdb16f0e0e..caa67464a8890e5c9d7f2efe8c972615344d2670 100644 (file)
@@ -800,7 +800,7 @@ slap_sort_vals(
                                break;
                        EXCH(l+1,j);
                        jstack += 2;
-                       if (ir-i+1 >= j) {
+                       if (ir-i+1 > j-l) {
                                istack[jstack] = ir;
                                istack[jstack-1] = i;
                                ir = j;