summaryrefslogtreecommitdiffstats
path: root/lib/libc/db/btree
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-02-16 17:29:11 +0000
committernectar <nectar@FreeBSD.org>2003-02-16 17:29:11 +0000
commit832e8b7f9a7422b49453b7e389ec411d3037a50f (patch)
tree3b5579370346d51f378192429db2130e5e82a6e4 /lib/libc/db/btree
parent81da3fbe2a40d9b80c8e96af564180f8aa22074e (diff)
downloadFreeBSD-src-832e8b7f9a7422b49453b7e389ec411d3037a50f.zip
FreeBSD-src-832e8b7f9a7422b49453b7e389ec411d3037a50f.tar.gz
Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
Diffstat (limited to 'lib/libc/db/btree')
-rw-r--r--lib/libc/db/btree/bt_put.c3
-rw-r--r--lib/libc/db/btree/bt_split.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c
index 4e1e89b..ea12bc0 100644
--- a/lib/libc/db/btree/bt_put.c
+++ b/lib/libc/db/btree/bt_put.c
@@ -225,7 +225,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) {
t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= index)
++t->bt_cursor.pg.index;
- if (t->bt_order == NOT)
+ if (t->bt_order == NOT) {
if (h->nextpg == P_INVALID) {
if (index == NEXTINDEX(h) - 1) {
t->bt_order = FORWARD;
@@ -239,6 +239,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) {
t->bt_last.pgno = h->pgno;
}
}
+ }
mpool_put(t->bt_mp, h, MPOOL_DIRTY);
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c
index d9ec874..9112ec8 100644
--- a/lib/libc/db/btree/bt_split.c
+++ b/lib/libc/db/btree/bt_split.c
@@ -672,8 +672,8 @@ bt_psplit(t, h, l, r, pskip, ilen)
* where we decide to try and copy too much onto the left page.
* Make sure that doesn't happen.
*/
- if (skip <= off &&
- used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) {
+ if ((skip <= off && used + nbytes + sizeof(indx_t) >= full)
+ || nxt == top - 1) {
--off;
break;
}
OpenPOWER on IntegriCloud