From 1f2569951365fd99ae5a581c897755dccf97c67d Mon Sep 17 00:00:00 2001 From: delphij Date: Sat, 28 Mar 2009 06:23:10 +0000 Subject: Diff reduce against OpenBSD, no functional change. --- lib/libc/db/hash/hash.c | 3 +-- lib/libc/db/hash/hash_page.c | 15 +++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'lib/libc') 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 */ -- cgit v1.1