]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/idl.c
Merge remote-tracking branch 'origin/mdb.RE/0.9'
[openldap] / servers / slapd / back-bdb / idl.c
index e48c9ac1fc4dcd3931bf95c36f762ac48dd36a02..a52d3da2752ab26e372eec4a224087704f616503 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2012 The OpenLDAP Foundation.
+ * Copyright 2000-2015 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1089,8 +1089,8 @@ bdb_idl_intersection(
         * turn it into a range.
         */
        if ( BDB_IDL_IS_RANGE( b )
-               && BDB_IDL_RANGE_FIRST( b ) <= BDB_IDL_RANGE_FIRST( a )
-               && BDB_IDL_RANGE_LAST( b ) >= BDB_IDL_RANGE_LAST( a ) ) {
+               && BDB_IDL_RANGE_FIRST( b ) <= BDB_IDL_FIRST( a )
+               && BDB_IDL_RANGE_LAST( b ) >= BDB_IDL_LLAST( a ) ) {
                if (idmax - idmin + 1 == a[0])
                {
                        a[0] = NOID;
@@ -1454,7 +1454,7 @@ bdb_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;
@@ -1472,7 +1472,7 @@ bdb_idl_sort( ID *ids, ID *tmp )
 /* 8 bit Radix sort + insertion sort
  * 
  * based on code from http://www.cubic.org/docs/radix.htm
- * with improvements by mbackes@symas.com and hyc@symas.com
+ * with improvements by ebackes@symas.com and hyc@symas.com
  *
  * This code is O(n) but has a relatively high constant factor. For lists
  * up to ~50 Quicksort is slightly faster; up to ~100 they are even.