summaryrefslogtreecommitdiffstats
path: root/lib/libc/db
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-03-28 06:23:10 +0000
committerdelphij <delphij@FreeBSD.org>2009-03-28 06:23:10 +0000
commit1f2569951365fd99ae5a581c897755dccf97c67d (patch)
tree1b75d9aebe505d23d64ef8abab7ea47ca58e650b /lib/libc/db
parent364bd8e1bf035f6d432b9ea9d0d11ca0e9177028 (diff)
downloadFreeBSD-src-1f2569951365fd99ae5a581c897755dccf97c67d.zip
FreeBSD-src-1f2569951365fd99ae5a581c897755dccf97c67d.tar.gz
Diff reduce against OpenBSD, no functional change.
Diffstat (limited to 'lib/libc/db')
-rw-r--r--lib/libc/db/hash/hash.c3
-rw-r--r--lib/libc/db/hash/hash_page.c15
2 files changed, 6 insertions, 12 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 4cd6fc3..925f5c6 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -347,8 +347,7 @@ init_hash(HTAB *hashp, const char *file, const HASHINFO *info)
static int
init_htab(HTAB *hashp, int nelem)
{
- int nbuckets, nsegs;
- int l2;
+ int nbuckets, nsegs, l2;
/*
* Divide number of elements by the fill factor and determine a
diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c
index 29e2936..dc267f4 100644
--- a/lib/libc/db/hash/hash_page.c
+++ b/lib/libc/db/hash/hash_page.c
@@ -124,9 +124,8 @@ putpair(char *p, const DBT *key, const DBT *val)
int
__delpair(HTAB *hashp, BUFHEAD *bufp, int ndx)
{
- u_int16_t *bp, newoff;
+ u_int16_t *bp, newoff, pairlen;
int n;
- u_int16_t pairlen;
bp = (u_int16_t *)bufp->page;
n = bp[0];
@@ -453,8 +452,7 @@ __addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val)
BUFHEAD *
__add_ovflpage(HTAB *hashp, BUFHEAD *bufp)
{
- u_int16_t *sp;
- u_int16_t ndx, ovfl_num;
+ u_int16_t *sp, ndx, ovfl_num;
#ifdef DEBUG1
int tmp1, tmp2;
#endif
@@ -505,8 +503,7 @@ int
__get_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_disk,
int is_bitmap)
{
- int fd, page, size;
- int rsize;
+ int fd, page, size, rsize;
u_int16_t *bp;
fd = hashp->fp;
@@ -560,8 +557,7 @@ __get_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_disk,
int
__put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap)
{
- int fd, page, size;
- int wsize;
+ int fd, page, size, wsize;
size = hashp->BSIZE;
if ((hashp->fp == -1) && open_temp(hashp))
@@ -569,8 +565,7 @@ __put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap)
fd = hashp->fp;
if (hashp->LORDER != BYTE_ORDER) {
- int i;
- int max;
+ int i, max;
if (is_bitmap) {
max = hashp->BSIZE >> 2; /* divide by 4 */
OpenPOWER on IntegriCloud