]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - db/btree/bt_put.c
update from main archive 961114
[thirdparty/glibc.git] / db / btree / bt_put.c
index 952be09e551f013a3da5e46d8bbcdfe4a595c97b..e6241152f33b3a3dccec7b3cf2f7ac456837d8d4 100644 (file)
@@ -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) {