From 54d79e995d5a6d0a393ed913b6e26dccc63de5b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 Nov 1996 04:08:00 +0000 Subject: update from main archive 961114 --- db/btree/bt_put.c | 4 ++-- db/btree/bt_split.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'db/btree') diff --git a/db/btree/bt_put.c b/db/btree/bt_put.c index 952be09e55..e6241152f3 100644 --- a/db/btree/bt_put.c +++ b/db/btree/bt_put.c @@ -201,7 +201,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) { * into the offset array, shift the pointers up. */ nbytes = NBLEAFDBT(key->size, data->size); - if (h->upper - h->lower < nbytes + sizeof(indx_t)) { + if ((u_int32_t) (h->upper - h->lower) < nbytes + sizeof(indx_t)) { if ((status = __bt_split(t, h, key, data, dflags, nbytes, index)) != RET_SUCCESS) return (status); @@ -284,7 +284,7 @@ bt_fast(t, key, data, exactp) * have to search to get split stack. */ nbytes = NBLEAFDBT(key->size, data->size); - if (h->upper - h->lower < nbytes + sizeof(indx_t)) + if ((u_int32_t) (h->upper - h->lower) < nbytes + sizeof(indx_t)) goto miss; if (t->bt_order == FORWARD) { diff --git a/db/btree/bt_split.c b/db/btree/bt_split.c index 1646d82159..d01db4ad9d 100644 --- a/db/btree/bt_split.c +++ b/db/btree/bt_split.c @@ -215,7 +215,8 @@ __bt_split(t, sp, key, data, flags, ilen, argskip) } /* Split the parent page if necessary or shift the indices. */ - if (h->upper - h->lower < nbytes + sizeof(indx_t)) { + if ((u_int32_t) (h->upper - h->lower) + < nbytes + sizeof(indx_t)) { sp = h; h = h->pgno == P_ROOT ? bt_root(t, h, &l, &r, &skip, nbytes) : -- cgit v1.2.3