diff options
author | Xin LI <delphij@FreeBSD.org> | 2009-03-04 00:58:04 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2009-03-04 00:58:04 +0000 |
commit | 3df1d93483fab9f4648b904ae1aeb1fb2a98e85a (patch) | |
tree | 756648717503997efc92e73d40047dd45f88ad87 /lib/libc/db/hash/hash_bigkey.c | |
parent | 725e9bc78c8a235a33fa849f89b3af5795160ebf (diff) |
Style changes (including additional casts to shut up warnings). This
commit does not affect MD5 of object file.
Notes
Notes:
svn path=/head/; revision=189327
Diffstat (limited to 'lib/libc/db/hash/hash_bigkey.c')
-rw-r--r-- | lib/libc/db/hash/hash_bigkey.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index d6464ae97cca..c2a1e03a4446 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -412,8 +412,8 @@ __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current) return (0); } - val->size = collect_data(hashp, bufp, (int)len, set_current); - if (val->size == -1) + val->size = (size_t)collect_data(hashp, bufp, (int)len, set_current); + if (val->size == (size_t)-1) return (-1); if (save_p->addr != save_addr) { /* We are pretty short on buffers. */ @@ -484,8 +484,8 @@ collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set) int __big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set) { - key->size = collect_key(hashp, bufp, 0, val, set); - if (key->size == -1) + key->size = (size_t)collect_key(hashp, bufp, 0, val, set); + if (key->size == (size_t)-1) return (-1); key->data = (u_char *)hashp->tmp_key; return (0); @@ -544,12 +544,10 @@ __big_split(HTAB *hashp, u_int32_t obucket, /* Old Bucket */ SPLIT_RETURN *ret) { - BUFHEAD *tmpp; - u_int16_t *tp; - BUFHEAD *bp; + BUFHEAD *bp, *tmpp; DBT key, val; u_int32_t change; - u_int16_t free_space, n, off; + u_int16_t free_space, n, off, *tp; bp = big_keyp; @@ -561,7 +559,7 @@ __big_split(HTAB *hashp, if ( (ret->next_addr = __find_last_page(hashp, &big_keyp)) ) { if (!(ret->nextp = __get_buf(hashp, ret->next_addr, big_keyp, 0))) - return (-1);; + return (-1); } else ret->nextp = NULL; |