summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-05-25 09:57:48 +0000
committerdelphij <delphij@FreeBSD.org>2007-05-25 09:57:48 +0000
commit16abe9b047ff84fb1d4b3d388563751e6b8be538 (patch)
tree6ace990a1ca88b1fb4da2aed5cdbd0e0e0e1d27e /lib
parentddbd7cde72b0cb0f96600a76e0df5f3320258929 (diff)
downloadFreeBSD-src-16abe9b047ff84fb1d4b3d388563751e6b8be538.zip
FreeBSD-src-16abe9b047ff84fb1d4b3d388563751e6b8be538.tar.gz
The usage of "info" in init_hash() is read-only, so constify
the internal interface instead of casting away the constant constraint upon calling.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/db/hash/hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 6fb7567..6b71d4a 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -68,7 +68,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 *);
@@ -140,7 +140,7 @@ __hash_open(file, flags, mode, info, dflags)
(void)_fcntl(hashp->fp, F_SETFD, 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 */
@@ -286,7 +286,7 @@ static HTAB *
init_hash(hashp, file, info)
HTAB *hashp;
const char *file;
- HASHINFO *info;
+ const HASHINFO *info;
{
struct stat statbuf;
int nelem;
OpenPOWER on IntegriCloud