diff options
author | 1998-03-19 00:29:51 +0000 | |
---|---|---|
committer | 1998-03-19 00:29:51 +0000 | |
commit | dfa5a4f6e3a2e75d92d79ce0e572feb85230a557 (patch) | |
tree | edbbc806584b9a4898b296c427abdb5c7f559aea /lib/libc/db | |
parent | Some -Wall (diff) | |
download | wireguard-openbsd-dfa5a4f6e3a2e75d92d79ce0e572feb85230a557.tar.xz wireguard-openbsd-dfa5a4f6e3a2e75d92d79ce0e572feb85230a557.zip |
some -Wall
Diffstat (limited to 'lib/libc/db')
-rw-r--r-- | lib/libc/db/btree/bt_delete.c | 6 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_put.c | 5 | ||||
-rw-r--r-- | lib/libc/db/hash/hash.c | 4 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_bigkey.c | 7 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_close.c | 6 |
5 files changed, 15 insertions, 13 deletions
diff --git a/lib/libc/db/btree/bt_delete.c b/lib/libc/db/btree/bt_delete.c index d97a9947d7e..cc8c175d5fe 100644 --- a/lib/libc/db/btree/bt_delete.c +++ b/lib/libc/db/btree/bt_delete.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: bt_delete.c,v 1.3 1996/08/19 08:20:05 tholo Exp $"; +static char rcsid[] = "$OpenBSD: bt_delete.c,v 1.4 1998/03/19 00:29:51 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -418,7 +418,7 @@ __bt_pdelete(t, h) * root page. If it's the rootpage, turn it back into an empty * leaf page. */ - if (NEXTINDEX(pg) == 1) + if (NEXTINDEX(pg) == 1) { if (pg->pgno == P_ROOT) { pg->lower = BTDATAOFF; pg->upper = t->bt_psize; @@ -428,7 +428,7 @@ __bt_pdelete(t, h) return (RET_ERROR); continue; } - else { + } else { /* Pack remaining key items at the end of the page. */ nksize = NBINTERNAL(bi->ksize); from = (char *)pg + pg->upper; diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c index 6615bd79196..3304ccdb5c5 100644 --- a/lib/libc/db/btree/bt_put.c +++ b/lib/libc/db/btree/bt_put.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: bt_put.c,v 1.4 1997/07/23 21:00:26 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: bt_put.c,v 1.5 1998/03/19 00:29:53 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -223,7 +223,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; @@ -237,6 +237,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/hash/hash.c b/lib/libc/db/hash/hash.c index 05653547a25..8b1140b9af3 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: hash.c,v 1.5 1997/07/23 21:00:27 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: hash.c,v 1.6 1998/03/19 00:29:55 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -869,7 +869,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 766948a1b11..7e51158980c 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.4 1996/09/15 09:30:48 tholo Exp $"; +static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.5 1998/03/19 00:29:56 millert Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -121,7 +121,7 @@ __big_insert(hashp, bufp, key, val) if (!bufp) return (-1); n = p[0]; - if (!key_size) + if (!key_size) { if (FREESPACE(p)) { move_bytes = MIN(FREESPACE(p), val_size); off = OFFSET(p) - move_bytes; @@ -134,6 +134,7 @@ __big_insert(hashp, bufp, key, val) OFFSET(p) = off; } else p[n - 2] = FULL_KEY; + } p = (u_int16_t *)bufp->page; cp = bufp->page; bufp->flags |= BUF_MOD; @@ -590,7 +591,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);; diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index 9c64ddc9964..88aea2e7583 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: rec_close.c,v 1.4 1996/09/15 09:30:53 tholo Exp $"; +static char rcsid[] = "$OpenBSD: rec_close.c,v 1.5 1998/03/19 00:29:58 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -79,14 +79,14 @@ __rec_close(dbp) if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize)) status = RET_ERROR; - if (!F_ISSET(t, R_INMEM)) + if (!F_ISSET(t, R_INMEM)) { if (F_ISSET(t, R_CLOSEFP)) { if (fclose(t->bt_rfp)) status = RET_ERROR; } else if (close(t->bt_rfd)) status = RET_ERROR; - + } if (__bt_close(dbp) == RET_ERROR) status = RET_ERROR; |