diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-07-12 18:57:58 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-07-12 18:57:58 +0000 |
commit | 51295a4d3e4c551df85249433c490208dc7fd23d (patch) | |
tree | c116431af8e1f042b25e0f70c63c437cf7ff8d63 /lib/libc/db | |
parent | af7a29993083b1562f01c87bb774fbe4fc3579e7 (diff) |
General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
Notes
Notes:
svn path=/head/; revision=17141
Diffstat (limited to 'lib/libc/db')
-rw-r--r-- | lib/libc/db/btree/bt_open.c | 8 | ||||
-rw-r--r-- | lib/libc/db/hash/hash.c | 2 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_bigkey.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/db/btree/bt_open.c b/lib/libc/db/btree/bt_open.c index f052249777d6..5fc316872dd5 100644 --- a/lib/libc/db/btree/bt_open.c +++ b/lib/libc/db/btree/bt_open.c @@ -125,7 +125,7 @@ __bt_open(fname, flags, mode, openinfo, dflags) */ if (b.psize && (b.psize < MINPSIZE || b.psize > MAX_PAGE_OFFSET + 1 || - b.psize & sizeof(indx_t) - 1)) + b.psize & (sizeof(indx_t) - 1) )) goto einval; /* Minimum number of keys per page; absolute minimum is 2. */ @@ -245,7 +245,7 @@ __bt_open(fname, flags, mode, openinfo, dflags) if (m.magic != BTREEMAGIC || m.version != BTREEVERSION) goto eftype; if (m.psize < MINPSIZE || m.psize > MAX_PAGE_OFFSET + 1 || - m.psize & sizeof(indx_t) - 1) + m.psize & (sizeof(indx_t) - 1) ) goto eftype; if (m.flags & ~SAVEMETA) goto eftype; @@ -278,8 +278,8 @@ __bt_open(fname, flags, mode, openinfo, dflags) t->bt_psize = b.psize; /* Set the cache size; must be a multiple of the page size. */ - if (b.cachesize && b.cachesize & b.psize - 1) - b.cachesize += (~b.cachesize & b.psize - 1) + 1; + if (b.cachesize && b.cachesize & (b.psize - 1) ) + b.cachesize += (~b.cachesize & (b.psize - 1) ) + 1; if (b.cachesize < b.psize * MINCACHE) b.cachesize = b.psize * MINCACHE; diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 68176e404ff4..7d000dc97c6f 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -875,7 +875,7 @@ hash_realloc(p_ptr, oldsize, newsize) { register void *p; - if (p = malloc(newsize)) { + if ( (p = malloc(newsize)) ) { memmove(p, *p_ptr, oldsize); memset((char *)p + oldsize, 0, newsize - oldsize); free(*p_ptr); diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index 578314a6455e..0cee07e1072c 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -590,7 +590,7 @@ __big_split(hashp, op, np, big_keyp, addr, obucket, ret) return (-1); change = (__call_hash(hashp, key.data, key.size) != obucket); - if (ret->next_addr = __find_last_page(hashp, &big_keyp)) { + if ( (ret->next_addr = __find_last_page(hashp, &big_keyp)) ) { if (!(ret->nextp = __get_buf(hashp, ret->next_addr, big_keyp, 0))) return (-1);; |