diff options
author | Xin LI <delphij@FreeBSD.org> | 2009-03-28 05:45:29 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2009-03-28 05:45:29 +0000 |
commit | f60486b3ce5512c89a3c3f9dfc411cdec048c921 (patch) | |
tree | 2886e758aa8188bda68aeabd1e440992d0ed0637 /lib/libc/db/btree | |
parent | 669697b4eab191868ab1f7fc72d5363fa12efd71 (diff) |
Several signed/unsigned warning fixes.
Notes
Notes:
svn path=/head/; revision=190484
Diffstat (limited to 'lib/libc/db/btree')
-rw-r--r-- | lib/libc/db/btree/bt_put.c | 4 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_split.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c index 31931dc79f7b..e4016c08d0d5 100644 --- a/lib/libc/db/btree/bt_put.c +++ b/lib/libc/db/btree/bt_put.c @@ -197,7 +197,7 @@ delete: if (__bt_dleaf(t, key, h, idx) == 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, idx)) != RET_SUCCESS) return (status); @@ -278,7 +278,7 @@ bt_fast(BTREE *t, const DBT *key, const DBT *data, int *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/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index 6ae3ce441523..18cd0ed4bff4 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -205,7 +205,7 @@ __bt_split(BTREE *t, PAGE *sp, const DBT *key, const DBT *data, int flags, } /* 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) : |