summaryrefslogtreecommitdiffstats
path: root/lib/libc/db/hash/hash_log2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/db/hash/hash_log2.c')
-rw-r--r--lib/libc/db/hash/hash_log2.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/db/hash/hash_log2.c b/lib/libc/db/hash/hash_log2.c
index b773707..c8c56bf 100644
--- a/lib/libc/db/hash/hash_log2.c
+++ b/lib/libc/db/hash/hash_log2.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1990, 1993
+ * Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
@@ -35,16 +35,18 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_log2.c 8.1 (Berkeley) 6/4/93";
+static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
-u_int
+#include <db.h>
+
+u_int32_t
__log2(num)
- u_int num;
+ u_int32_t num;
{
- register u_int i, limit;
+ register u_int32_t i, limit;
limit = 1;
for (i = 0; limit < num; limit = limit << 1, i++);
OpenPOWER on IntegriCloud