summaryrefslogtreecommitdiff
path: root/lib/libc/db/hash
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-09-15 09:32:02 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-09-15 09:32:02 +0000
commit5839b84db8fa4a49976868786c93b29df9c4d568 (patch)
treeef3d545e61baa18f319312ada4e97e2c799c24c6 /lib/libc/db/hash
parent1d3f47d20a2b64c481a047ce24f39564b3e74533 (diff)
Remove dead code
Remove unused variables Silence some warnings lint(1) is your friend
Diffstat (limited to 'lib/libc/db/hash')
-rw-r--r--lib/libc/db/hash/hash.c3
-rw-r--r--lib/libc/db/hash/hash_bigkey.c6
-rw-r--r--lib/libc/db/hash/hash_func.c8
3 files changed, 12 insertions, 5 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 66ccc848e86..e762e5ff5f3 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash.c,v 1.3 1996/08/19 08:20:31 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash.c,v 1.4 1996/09/15 09:30:47 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -92,6 +92,7 @@ int hash_accesses, hash_collisions, hash_expansions, hash_overflows;
/************************** INTERFACE ROUTINES ***************************/
/* OPEN/CLOSE */
+/* ARGSUSED */
extern DB *
__hash_open(file, flags, mode, info, dflags)
const char *file;
diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c
index 515dcceb719..766948a1b11 100644
--- a/lib/libc/db/hash/hash_bigkey.c
+++ b/lib/libc/db/hash/hash_bigkey.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.3 1996/08/19 08:20:34 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.4 1996/09/15 09:30:48 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -431,7 +431,7 @@ __big_return(hashp, bufp, ndx, val, set_current)
}
val->size = collect_data(hashp, bufp, (int)len, set_current);
- if (val->size == -1)
+ if (val->size == (size_t) -1)
return (-1);
if (save_p->addr != save_addr) {
/* We are pretty short on buffers. */
@@ -510,7 +510,7 @@ __big_keydata(hashp, bufp, key, val, set)
int set;
{
key->size = collect_key(hashp, bufp, 0, val, set);
- if (key->size == -1)
+ if (key->size == (size_t) -1)
return (-1);
key->data = (u_char *)hashp->tmp_key;
return (0);
diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c
index 085f758b12a..5c8b52604c6 100644
--- a/lib/libc/db/hash/hash_func.c
+++ b/lib/libc/db/hash/hash_func.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash_func.c,v 1.3 1996/08/19 08:20:37 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash_func.c,v 1.4 1996/09/15 09:30:49 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -45,9 +45,11 @@ static char rcsid[] = "$OpenBSD: hash_func.c,v 1.3 1996/08/19 08:20:37 tholo Exp
#include "page.h"
#include "extern.h"
+#ifdef notdef
static u_int32_t hash1 __P((const void *, size_t));
static u_int32_t hash2 __P((const void *, size_t));
static u_int32_t hash3 __P((const void *, size_t));
+#endif
static u_int32_t hash4 __P((const void *, size_t));
/* Global default hash function */
@@ -62,6 +64,9 @@ u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4;
* This came from ejb's hsearch.
*/
+#ifdef notdef
+
+
#define PRIME1 37
#define PRIME2 1048583
@@ -160,6 +165,7 @@ hash3(keyarg, len)
}
return (h);
}
+#endif
/* Hash function from Chris Torek. */
static u_int32_t