From 9df4ae7d6bfb7604fc33bde93812c176cb11a355 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 12 Sep 2005 05:52:55 +0000 Subject: [PATCH] Fix prev commit --- servers/slapd/back-bdb/idl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index 2b7560417e..b29860f820 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -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; -- 2.39.5