From 5ecf77c0348cafc7186fdb41e021f17e7fc52dca Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 7 Aug 1999 23:25:48 +0000 Subject: [PATCH] Eliminate a bubble move. --- servers/slapd/back-ldbm/idl.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index 670c608a54..505f602779 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -647,16 +647,9 @@ idl_insert( ID_BLOCK **idl, ID id, unsigned int maxids ) (ID_BLOCK_NMAX(*idl) + ID_BLOCK_IDS_OFFSET) * sizeof(ID) ); } - /* make a slot for the new id *//* XXX bubble move XXX */ -#define BUBBLE 1 -#ifdef BUBBLE - for ( j = ID_BLOCK_NIDS(*idl); j != i; j-- ) { - ID_BLOCK_ID(*idl, j) = ID_BLOCK_ID(*idl, j-1); - } -#else + /* make a slot for the new id */ SAFEMEMCPY( &ID_BLOCK_ID(*idl, i), &ID_BLOCK_ID(*idl, i+1), ID_BLOCK_NIDS(*idl) - i ); -#endif ID_BLOCK_ID(*idl, i) = id; ID_BLOCK_NIDS(*idl)++; -- 2.39.5