summaryrefslogtreecommitdiff
path: root/lib/dns/acache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/acache.c')
-rw-r--r--lib/dns/acache.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/dns/acache.c b/lib/dns/acache.c
index d3d28f8561710..d7a11f764391c 100644
--- a/lib/dns/acache.c
+++ b/lib/dns/acache.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2012, 2013, 2015 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -472,8 +472,7 @@ finddbent(dns_acache_t *acache, dns_db_t *db, dbentry_t **dbentryp) {
* The caller must be holding the acache lock.
*/
- bucket = isc_hash_calc((const unsigned char *)&db,
- sizeof(db), ISC_TRUE) % DBBUCKETS;
+ bucket = isc_hash_function(&db, sizeof(db), ISC_TRUE, NULL) % DBBUCKETS;
for (dbentry = ISC_LIST_HEAD(acache->dbbucket[bucket]);
dbentry != NULL;
@@ -1264,8 +1263,7 @@ dns_acache_setdb(dns_acache_t *acache, dns_db_t *db) {
dbentry->db = NULL;
dns_db_attach(db, &dbentry->db);
- bucket = isc_hash_calc((const unsigned char *)&db,
- sizeof(db), ISC_TRUE) % DBBUCKETS;
+ bucket = isc_hash_function(&db, sizeof(db), ISC_TRUE, NULL) % DBBUCKETS;
ISC_LIST_APPEND(acache->dbbucket[bucket], dbentry, link);
@@ -1353,8 +1351,8 @@ dns_acache_putdb(dns_acache_t *acache, dns_db_t *db) {
INSIST(ISC_LIST_EMPTY(dbentry->originlist) &&
ISC_LIST_EMPTY(dbentry->referlist));
- bucket = isc_hash_calc((const unsigned char *)&db,
- sizeof(db), ISC_TRUE) % DBBUCKETS;
+ bucket = isc_hash_function(&db, sizeof(db), ISC_TRUE, NULL) % DBBUCKETS;
+
ISC_LIST_UNLINK(acache->dbbucket[bucket], dbentry, link);
dns_db_detach(&dbentry->db);