]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit
authorHoward Chu <hyc@openldap.org>
Mon, 12 Sep 2005 05:52:55 +0000 (05:52 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Sep 2005 05:52:55 +0000 (05:52 +0000)
servers/slapd/back-bdb/idl.c

index 2b7560417e7e6c14861fe84ebf71edc8b889d5bf..b29860f820eac3c53bce8fc5c3d103ee06182d2f 100644 (file)
@@ -1302,10 +1302,12 @@ int bdb_idl_append( ID *a, ID *b )
 #define SMALL  8
 #define        SWAP(a,b)       a^=b;b^=a;a^=b  /* Swap integers without temp var */
 
+#define ISTACK ((BDB_IDL_LOGN+1)*2)
+
 void
 bdb_idl_sort( ID *ids )
 {
-       int istack[(BDB_IDL_LOGN+1)*2];
+       int istack[ISTACK];
        int i,j,k,l,ir,jstack;
        ID a;
 
@@ -1352,7 +1354,7 @@ bdb_idl_sort( ID *ids )
                        ids[l+1] = ids[j];
                        ids[j] = a;
                        jstack += 2;
-                       assert(jstack <= BDB_IDL_LOGN*4);
+                       assert(jstack <= ISTACK);
                        if (ir-i+1 >= j-1) {
                                istack[jstack] = ir;
                                istack[jstack-1] = i;