diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-01 18:10:40 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-01 18:10:40 +0000 |
commit | ed6efae2dba6143d1c21d82392e1b680aee93b47 (patch) | |
tree | 55dc8e9dd465609afc24995331d9d82131959c8b /lib/libc/db/btree/bt_split.c | |
parent | 5d5ba77fa39697f34aab55cc4e7135f3861e6d15 (diff) |
Fix a condition where the hole would be inserted in the wrong place during a
split; mycroft@netbsd.org
Diffstat (limited to 'lib/libc/db/btree/bt_split.c')
-rw-r--r-- | lib/libc/db/btree/bt_split.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index 43cd217af6a..727d04d335a 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_split.c,v 1.6 1999/02/15 05:11:23 millert Exp $ */ +/* $OpenBSD: bt_split.c,v 1.7 2002/02/01 18:10:39 millert Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if defined(LIBC_SCCS) && !defined(lint) #if 0 -static char rcsid[] = "$OpenBSD: bt_split.c,v 1.6 1999/02/15 05:11:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: bt_split.c,v 1.7 2002/02/01 18:10:39 millert Exp $"; #else static char sccsid[] = "@(#)bt_split.c 8.10 (Berkeley) 1/9/95"; #endif @@ -731,7 +731,7 @@ bt_psplit(t, h, l, r, pskip, ilen) * the right page. */ if (skip <= off) { - skip = 0; + skip = MAX_PAGE_OFFSET; rval = l; } else { rval = r; @@ -741,7 +741,7 @@ bt_psplit(t, h, l, r, pskip, ilen) for (off = 0; nxt < top; ++off) { if (skip == nxt) { ++off; - skip = 0; + skip = MAX_PAGE_OFFSET; } switch (h->flags & P_TYPE) { case P_BINTERNAL: |