From: Howard Chu Date: Mon, 18 Mar 2013 18:43:47 +0000 (-0700) Subject: ITS#7542, more for ITS#7432 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=02b22e7e59dca93c2bf8e4b6ada9e21f58271480;p=openldap ITS#7542, more for ITS#7432 typos in quicksort --- diff --git a/servers/slapd/back-mdb/idl.c b/servers/slapd/back-mdb/idl.c index eee2afc670..9260d2be9a 100644 --- a/servers/slapd/back-mdb/idl.c +++ b/servers/slapd/back-mdb/idl.c @@ -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; diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 7b82133dd8..caa67464a8 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -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;