diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-03-23 19:35:00 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-03-23 19:35:00 +0000 |
commit | 1a88b22742a7df6205d19a7ecf78aba3eda53a16 (patch) | |
tree | a45ce9ebf2f99c9486e0f0e47d77fa69a6265ccc /lib/libc/db/hash | |
parent | 68d8bc8b8c8f1e4de98ae6f483ac210dfdf13420 (diff) |
ansify. ok deraadt@ moritz@
Diffstat (limited to 'lib/libc/db/hash')
-rw-r--r-- | lib/libc/db/hash/hash.c | 94 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_bigkey.c | 79 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_buf.c | 37 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_func.c | 20 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_page.c | 95 |
5 files changed, 102 insertions, 223 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index ede3945a875..b2b5b6c40e3 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.18 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash.c,v 1.19 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94"; #else -static const char rcsid[] = "$OpenBSD: hash.c,v 1.18 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash.c,v 1.19 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -95,13 +95,10 @@ int hash_accesses, hash_collisions, hash_expansions, hash_overflows; /* OPEN/CLOSE */ /* ARGSUSED */ -extern DB * -__hash_open(file, flags, mode, info, dflags) - const char *file; - int flags; - int mode; - const HASHINFO *info; /* Special directives for create */ - int dflags; +DB * +__hash_open(const char *file, int flags, int mode, + const HASHINFO *info, /* Special directives for create */ + int dflags) { HTAB *hashp; struct stat statbuf; @@ -244,8 +241,7 @@ error0: } static int -hash_close(dbp) - DB *dbp; +hash_close(DB *dbp) { HTAB *hashp; int retval; @@ -260,8 +256,7 @@ hash_close(dbp) } static int -hash_fd(dbp) - const DB *dbp; +hash_fd(const DB *dbp) { HTAB *hashp; @@ -278,10 +273,7 @@ hash_fd(dbp) /************************** LOCAL CREATION ROUTINES **********************/ static HTAB * -init_hash(hashp, file, info) - HTAB *hashp; - const char *file; - HASHINFO *info; +init_hash(HTAB *hashp, const char *file, HASHINFO *info) { struct stat statbuf; int nelem; @@ -345,9 +337,7 @@ init_hash(hashp, file, info) * Returns 0 on No Error */ static int -init_htab(hashp, nelem) - HTAB *hashp; - int nelem; +init_htab(HTAB *hashp, int nelem) { int nbuckets, nsegs, l2; @@ -390,8 +380,7 @@ init_htab(hashp, nelem) * structure, freeing all allocated space. */ static int -hdestroy(hashp) - HTAB *hashp; +hdestroy(HTAB *hashp) { int i, save_errno; @@ -454,9 +443,7 @@ hdestroy(hashp) * -1 ERROR */ static int -hash_sync(dbp, flags) - const DB *dbp; - u_int32_t flags; +hash_sync(const DB *dbp, u_int32_t flags) { HTAB *hashp; @@ -483,8 +470,7 @@ hash_sync(dbp, flags) * -1 indicates that errno should be set */ static int -flush_meta(hashp) - HTAB *hashp; +flush_meta(HTAB *hashp) { HASHHDR *whdrp; #if BYTE_ORDER == LITTLE_ENDIAN @@ -530,11 +516,7 @@ flush_meta(hashp) * -1 to indicate an internal ERROR (i.e. out of memory, etc) */ static int -hash_get(dbp, key, data, flag) - const DB *dbp; - const DBT *key; - DBT *data; - u_int32_t flag; +hash_get(const DB *dbp, const DBT *key, DBT *data, u_int32_t flag) { HTAB *hashp; @@ -547,11 +529,7 @@ hash_get(dbp, key, data, flag) } static int -hash_put(dbp, key, data, flag) - const DB *dbp; - DBT *key; - const DBT *data; - u_int32_t flag; +hash_put(const DB *dbp, DBT *key, const DBT *data, u_int32_t flag) { HTAB *hashp; @@ -569,10 +547,8 @@ hash_put(dbp, key, data, flag) } static int -hash_delete(dbp, key, flag) - const DB *dbp; - const DBT *key; - u_int32_t flag; /* Ignored */ +hash_delete(const DB *dbp, const DBT *key, + u_int32_t flag) /* Ignored */ { HTAB *hashp; @@ -592,10 +568,7 @@ hash_delete(dbp, key, flag) * Assume that hashp has been set in wrapper routine. */ static int -hash_access(hashp, action, key, val) - HTAB *hashp; - ACTION action; - DBT *key, *val; +hash_access(HTAB *hashp, ACTION action, DBT *key, DBT *val) { BUFHEAD *rbufp; BUFHEAD *bufp, *save_bufp; @@ -721,10 +694,7 @@ found: } static int -hash_seq(dbp, key, data, flag) - const DB *dbp; - DBT *key, *data; - u_int32_t flag; +hash_seq(const DB *dbp, DBT *key, DBT *data, u_int32_t flag) { u_int32_t bucket; BUFHEAD *bufp; @@ -810,9 +780,8 @@ hash_seq(dbp, key, data, flag) * 0 ==> OK * -1 ==> Error */ -extern int -__expand_table(hashp) - HTAB *hashp; +int +__expand_table(HTAB *hashp) { u_int32_t old_bucket, new_bucket; int dirsize, new_segnum, spare_ndx; @@ -866,9 +835,7 @@ __expand_table(hashp) * fails, then this routine can go away. */ static void * -hash_realloc(p_ptr, oldsize, newsize) - SEGMENT **p_ptr; - int oldsize, newsize; +hash_realloc(SEGMENT **p_ptr, int oldsize, int newsize) { void *p; @@ -881,11 +848,8 @@ hash_realloc(p_ptr, oldsize, newsize) return (p); } -extern u_int32_t -__call_hash(hashp, k, len) - HTAB *hashp; - char *k; - int len; +u_int32_t +__call_hash(HTAB *hashp, char *k, int len) { int n, bucket; @@ -902,9 +866,7 @@ __call_hash(hashp, k, len) * Returns 0 on success */ static int -alloc_segs(hashp, nsegs) - HTAB *hashp; - int nsegs; +alloc_segs(HTAB *hashp, int nsegs) { int i; SEGMENT store; @@ -936,8 +898,7 @@ alloc_segs(hashp, nsegs) * Hashp->hdr needs to be byteswapped. */ static void -swap_header_copy(srcp, destp) - HASHHDR *srcp, *destp; +swap_header_copy(HASHHDR *srcp, HASHHDR *destp) { int i; @@ -965,8 +926,7 @@ swap_header_copy(srcp, destp) } static void -swap_header(hashp) - HTAB *hashp; +swap_header(HTAB *hashp) { HASHHDR *hdrp; int i; diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index fd51e40d7aa..2b67c093d19 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_bigkey.c,v 1.14 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash_bigkey.c,v 1.15 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94"; #else -static const char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.14 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.15 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -86,11 +86,8 @@ static int collect_data(HTAB *, BUFHEAD *, int, int); * 0 ==> OK *-1 ==> ERROR */ -extern int -__big_insert(hashp, bufp, key, val) - HTAB *hashp; - BUFHEAD *bufp; - const DBT *key, *val; +int +__big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) { u_int16_t *p; int key_size, n, val_size; @@ -198,10 +195,8 @@ __big_insert(hashp, bufp, key, val) * 0 => OK *-1 => ERROR */ -extern int -__big_delete(hashp, bufp) - HTAB *hashp; - BUFHEAD *bufp; +int +__big_delete(HTAB *hashp, BUFHEAD *bufp) { BUFHEAD *last_bfp, *rbufp; u_int16_t *bp, pageno; @@ -277,13 +272,8 @@ __big_delete(hashp, bufp) * -2 means key not found and this is big key/data * -3 error */ -extern int -__find_bigpair(hashp, bufp, ndx, key, size) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; - char *key; - int size; +int +__find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size) { u_int16_t *bp; char *p; @@ -329,10 +319,8 @@ __find_bigpair(hashp, bufp, ndx, key, size) * of the pair; 0 if there isn't any (i.e. big pair is the last key in the * bucket) */ -extern u_int16_t -__find_last_page(hashp, bpp) - HTAB *hashp; - BUFHEAD **bpp; +u_int16_t +__find_last_page(HTAB *hashp, BUFHEAD **bpp) { BUFHEAD *bufp; u_int16_t *bp, pageno; @@ -370,13 +358,8 @@ __find_last_page(hashp, bpp) * Return the data for the key/data pair that begins on this page at this * index (index should always be 1). */ -extern int -__big_return(hashp, bufp, ndx, val, set_current) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; - DBT *val; - int set_current; +int +__big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current) { BUFHEAD *save_p; u_int16_t *bp, len, off, save_addr; @@ -462,10 +445,7 @@ __big_return(hashp, bufp, ndx, val, set_current) * allocate a buffer and copy the data as you recurse up. */ static int -collect_data(hashp, bufp, len, set) - HTAB *hashp; - BUFHEAD *bufp; - int len, set; +collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set) { u_int16_t *bp; char *p; @@ -517,12 +497,8 @@ collect_data(hashp, bufp, len, set) /* * Fill in the key and data for this big pair. */ -extern int -__big_keydata(hashp, bufp, key, val, set) - HTAB *hashp; - BUFHEAD *bufp; - DBT *key, *val; - int set; +int +__big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set) { key->size = collect_key(hashp, bufp, 0, val, set); if (key->size == (size_t)-1) @@ -536,12 +512,7 @@ __big_keydata(hashp, bufp, key, val, set) * collect the data, allocate a buffer and copy the key as you recurse up. */ static int -collect_key(hashp, bufp, len, val, set) - HTAB *hashp; - BUFHEAD *bufp; - int len; - DBT *val; - int set; +collect_key(HTAB *hashp, BUFHEAD *bufp, int len, DBT *val, int set) { BUFHEAD *xbp; char *p; @@ -580,16 +551,14 @@ collect_key(hashp, bufp, len, val, set) * 0 => OK * -1 => error */ -extern int -__big_split(hashp, op, np, big_keyp, addr, obucket, ret) - HTAB *hashp; - BUFHEAD *op; /* Pointer to where to put keys that go in old bucket */ - BUFHEAD *np; /* Pointer to new bucket page */ - /* Pointer to first page containing the big key/data */ - BUFHEAD *big_keyp; - int addr; /* Address of big_keyp */ - u_int32_t obucket;/* Old Bucket */ - SPLIT_RETURN *ret; +int +__big_split(HTAB *hashp, + BUFHEAD *op, /* Pointer to where to put keys that go in old bucket */ + BUFHEAD *np, /* Pointer to new bucket page */ + BUFHEAD *big_keyp, /* Pointer to first page containing the big key/data */ + int addr, /* Address of big_keyp */ + u_int32_t obucket, /* Old Bucket */ + SPLIT_RETURN *ret) { BUFHEAD *bp, *tmpp; DBT key, val; diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c index ab262ba5471..0e2050b25b3 100644 --- a/lib/libc/db/hash/hash_buf.c +++ b/lib/libc/db/hash/hash_buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_buf.c,v 1.14 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash_buf.c,v 1.15 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94"; #else -static const char rcsid[] = "$OpenBSD: hash_buf.c,v 1.14 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_buf.c,v 1.15 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -104,12 +104,10 @@ static BUFHEAD *newbuf(HTAB *, u_int32_t, BUFHEAD *); * be valid. Therefore, you must always verify that its address matches the * address you are seeking. */ -extern BUFHEAD * -__get_buf(hashp, addr, prev_bp, newpage) - HTAB *hashp; - u_int32_t addr; - BUFHEAD *prev_bp; - int newpage; /* If prev_bp set, indicates a new overflow page. */ +BUFHEAD * +__get_buf(HTAB *hashp, u_int32_t addr, + BUFHEAD *prev_bp, /* If prev_bp set, indicates a new overflow page. */ + int newpage) { BUFHEAD *bp; u_int32_t is_disk_mask; @@ -160,10 +158,7 @@ __get_buf(hashp, addr, prev_bp, newpage) * If newbuf finds an error (returning NULL), it also sets errno. */ static BUFHEAD * -newbuf(hashp, addr, prev_bp) - HTAB *hashp; - u_int32_t addr; - BUFHEAD *prev_bp; +newbuf(HTAB *hashp, u_int32_t addr, BUFHEAD *prev_bp) { BUFHEAD *bp; /* The buffer we're going to use */ BUFHEAD *xbp; /* Temp pointer */ @@ -293,10 +288,8 @@ newbuf(hashp, addr, prev_bp) return (bp); } -extern void -__buf_init(hashp, nbytes) - HTAB *hashp; - int nbytes; +void +__buf_init(HTAB *hashp, int nbytes) { BUFHEAD *bfp; int npages; @@ -318,10 +311,8 @@ __buf_init(hashp, nbytes) */ } -extern int -__buf_free(hashp, do_free, to_disk) - HTAB *hashp; - int do_free, to_disk; +int +__buf_free(HTAB *hashp, int do_free, int to_disk) { BUFHEAD *bp; @@ -351,10 +342,8 @@ __buf_free(hashp, do_free, to_disk) return (0); } -extern void -__reclaim_buf(hashp, bp) - HTAB *hashp; - BUFHEAD *bp; +void +__reclaim_buf(HTAB *hashp, BUFHEAD *bp) { bp->ovfl = 0; bp->addr = 0; diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c index f4fe9289678..870ce3d939b 100644 --- a/lib/libc/db/hash/hash_func.c +++ b/lib/libc/db/hash/hash_func.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_func.c,v 1.8 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: hash_func.c,v 1.9 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_func.c 8.4 (Berkeley) 11/7/95"; #else -static const char rcsid[] = "$OpenBSD: hash_func.c,v 1.8 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_func.c,v 1.9 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -68,9 +68,7 @@ u_int32_t (*__default_hash)(const void *, size_t) = hash4; #define PRIME2 1048583 u_int32_t -hash1(key, len) - const void *key; - size_t len; +hash1(const void *key, size_t len) { u_int32_t h; u_int8_t *k; @@ -90,9 +88,7 @@ hash1(key, len) #define dcharhash(h, c) ((h) = 0x63c63cd9*(h) + 0x9c39c33d + (c)) u_int32_t -hash2(key, len) - const void *key; - size_t len; +hash2(const void *key, size_t len) { u_int32_t h; u_int8_t *e, c, *k; @@ -118,9 +114,7 @@ hash2(key, len) * Ozan Yigit's original sdbm hash. */ u_int32_t -hash3(key, len) - const void *key; - size_t len; +hash3(const void *key, size_t len) { u_int32_t n, loop; u_int8_t *k; @@ -160,9 +154,7 @@ hash3(key, len) /* Chris Torek's hash function. */ u_int32_t -hash4(key, len) - const void *key; - size_t len; +hash4(const void *key, size_t len) { u_int32_t h, loop; u_int8_t *k; diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c index 8f926e78d29..8526680c5f7 100644 --- a/lib/libc/db/hash/hash_page.c +++ b/lib/libc/db/hash/hash_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_page.c,v 1.15 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash_page.c,v 1.16 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94"; #else -static const char rcsid[] = "$OpenBSD: hash_page.c,v 1.15 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_page.c,v 1.16 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -94,9 +94,7 @@ static int ugly_split(HTAB *, u_int32_t, BUFHEAD *, BUFHEAD *, int, int); * stuff on. */ static void -putpair(p, key, val) - char *p; - const DBT *key, *val; +putpair(char *p, const DBT *key, const DBT *val) { u_int16_t *bp, n, off; @@ -125,11 +123,8 @@ putpair(p, key, val) * 0 OK * -1 error */ -extern int -__delpair(hashp, bufp, ndx) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; +int +__delpair(HTAB *hashp, BUFHEAD *bufp, int ndx) { u_int16_t *bp, newoff, pairlen; int n; @@ -177,10 +172,8 @@ __delpair(hashp, bufp, ndx) * 0 ==> OK * -1 ==> Error */ -extern int -__split_page(hashp, obucket, nbucket) - HTAB *hashp; - u_int32_t obucket, nbucket; +int +__split_page(HTAB *hashp, u_int32_t obucket, u_int32_t nbucket) { BUFHEAD *new_bufp, *old_bufp; u_int16_t *ino; @@ -274,12 +267,12 @@ __split_page(hashp, obucket, nbucket) * -1 ==> failure */ static int -ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved) - HTAB *hashp; - u_int32_t obucket; /* Same as __split_page. */ - BUFHEAD *old_bufp, *new_bufp; - int copyto; /* First byte on page which contains key/data values. */ - int moved; /* Number of pairs moved to new page. */ +ugly_split(HTAB *hashp, + u_int32_t obucket, /* Same as __split_page. */ + BUFHEAD *old_bufp, + BUFHEAD *new_bufp, + int copyto, /* First byte on page which contains key/data values. */ + int moved) /* Number of pairs moved to new page. */ { BUFHEAD *bufp; /* Buffer header for ino */ u_int16_t *ino; /* Page keys come off of */ @@ -394,11 +387,8 @@ ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved) * 0 ==> OK * 1 ==> failure */ -extern int -__addel(hashp, bufp, key, val) - HTAB *hashp; - BUFHEAD *bufp; - const DBT *key, *val; +int +__addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) { u_int16_t *bp, *sop; int do_expand; @@ -467,10 +457,8 @@ stats: * pointer on success * NULL on error */ -extern BUFHEAD * -__add_ovflpage(hashp, bufp) - HTAB *hashp; - BUFHEAD *bufp; +BUFHEAD * +__add_ovflpage(HTAB *hashp, BUFHEAD *bufp) { u_int16_t *sp, ndx, ovfl_num; #ifdef DEBUG1 @@ -519,12 +507,9 @@ __add_ovflpage(hashp, bufp) * 0 indicates SUCCESS * -1 indicates FAILURE */ -extern int -__get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap) - HTAB *hashp; - char *p; - u_int32_t bucket; - int is_bucket, is_disk, is_bitmap; +int +__get_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_disk, + int is_bitmap) { int fd, page, size, rsize; u_int16_t *bp; @@ -577,12 +562,8 @@ __get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap) * 0 ==> OK * -1 ==>failure */ -extern int -__put_page(hashp, p, bucket, is_bucket, is_bitmap) - HTAB *hashp; - char *p; - u_int32_t bucket; - int is_bucket, is_bitmap; +int +__put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap) { int fd, page, size, wsize; @@ -623,10 +604,8 @@ __put_page(hashp, p, bucket, is_bucket, is_bitmap) * Initialize a new bitmap page. Bitmap pages are left in memory * once they are read in. */ -extern int -__ibitmap(hashp, pnum, nbits, ndx) - HTAB *hashp; - int pnum, nbits, ndx; +int +__ibitmap(HTAB *hashp, int pnum, int nbits, int ndx) { u_int32_t *ip; int clearbytes, clearints; @@ -647,8 +626,7 @@ __ibitmap(hashp, pnum, nbits, ndx) } static u_int32_t -first_free(map) - u_int32_t map; +first_free(u_int32_t map) { u_int32_t i, mask; @@ -662,8 +640,7 @@ first_free(map) } static u_int16_t -overflow_page(hashp) - HTAB *hashp; +overflow_page(HTAB *hashp) { u_int32_t *freep; int max_free, offset, splitnum; @@ -815,10 +792,8 @@ found: /* * Mark this overflow page as free. */ -extern void -__free_ovflpage(hashp, obufp) - HTAB *hashp; - BUFHEAD *obufp; +void +__free_ovflpage(HTAB *hashp, BUFHEAD *obufp) { u_int16_t addr; u_int32_t *freep; @@ -862,8 +837,7 @@ __free_ovflpage(hashp, obufp) * -1 failure */ static int -open_temp(hashp) - HTAB *hashp; +open_temp(HTAB *hashp) { sigset_t set, oset; char *envtmp = NULL; @@ -890,9 +864,7 @@ open_temp(hashp) * an overflow pair, so we need to shift things. */ static void -squeeze_key(sp, key, val) - u_int16_t *sp; - const DBT *key, *val; +squeeze_key(u_int16_t *sp, const DBT *key, const DBT *val) { char *p; u_int16_t free_space, n, off, pageno; @@ -917,9 +889,7 @@ squeeze_key(sp, key, val) } static u_int32_t * -fetch_bitmap(hashp, ndx) - HTAB *hashp; - int ndx; +fetch_bitmap(HTAB *hashp, int ndx) { if (ndx >= hashp->nmaps) return (NULL); @@ -935,8 +905,7 @@ fetch_bitmap(hashp, ndx) #ifdef DEBUG4 int -print_chain(addr) - int addr; +print_chain(int addr) { BUFHEAD *bufp; short *bp, oaddr; |