diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2010-07-02 16:46:29 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2010-07-02 16:46:29 +0000 |
commit | 4d2486b3dbf3e9ae0c6d38b616a80feed0b5e05a (patch) | |
tree | 3938d04724d342581ceeb03109c5c7eaf6cd23f5 /lib/libc/db | |
parent | 1afe49bbbd9361f6c2c68d329dde8a99e343e71d (diff) |
Constipate init_hash() to eliminate a warning and remove a cast that is
thereby rendered superfluous
ok blambert@
Diffstat (limited to 'lib/libc/db')
-rw-r--r-- | lib/libc/db/hash/hash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 1ec9ec8bf00..f97cf4d1db9 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.22 2008/05/11 22:21:25 millert Exp $ */ +/* $OpenBSD: hash.c,v 1.23 2010/07/02 16:46:28 guenther Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -62,7 +62,7 @@ static void *hash_realloc(SEGMENT **, int, int); static int hash_seq(const DB *, DBT *, DBT *, u_int32_t); static int hash_sync(const DB *, u_int32_t); static int hdestroy(HTAB *); -static HTAB *init_hash(HTAB *, const char *, HASHINFO *); +static HTAB *init_hash(HTAB *, const char *, const HASHINFO *); static int init_htab(HTAB *, int); #if BYTE_ORDER == LITTLE_ENDIAN static void swap_header(HTAB *); @@ -124,7 +124,7 @@ __hash_open(const char *file, int flags, int mode, new_table = 1; if (new_table) { - if (!(hashp = init_hash(hashp, file, (HASHINFO *)info))) + if (!(hashp = init_hash(hashp, file, info))) RETURN_ERROR(errno, error1); } else { /* Table already exists */ @@ -264,7 +264,7 @@ hash_fd(const DB *dbp) /************************** LOCAL CREATION ROUTINES **********************/ static HTAB * -init_hash(HTAB *hashp, const char *file, HASHINFO *info) +init_hash(HTAB *hashp, const char *file, const HASHINFO *info) { struct stat statbuf; int nelem; |