summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2010-04-12 21:13:03 +0000
committerAndriy Gapon <avg@FreeBSD.org>2010-04-12 21:13:03 +0000
commit8b0482d98fc04b697d39346a47168d70b412cc9b (patch)
tree3c5272c398d0243655f6419854f1f03be2696dde /lib/libc
parent6075b76ed7605694a1bd4c1e79860ae5d68fd331 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/db/hash/hash.c2
-rw-r--r--lib/libc/db/hash/hash.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 6b71d4a7c30f..02a9c5849a44 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -309,6 +309,8 @@ init_hash(hashp, file, info)
if (stat(file, &statbuf))
return (NULL);
hashp->BSIZE = statbuf.st_blksize;
+ if (hashp->BSIZE > MAX_BSIZE)
+ hashp->BSIZE = MAX_BSIZE;
hashp->BSHIFT = __log2(hashp->BSIZE);
}
diff --git a/lib/libc/db/hash/hash.h b/lib/libc/db/hash/hash.h
index 66f86aa3d72c..70cca5b694df 100644
--- a/lib/libc/db/hash/hash.h
+++ b/lib/libc/db/hash/hash.h
@@ -118,7 +118,7 @@ typedef struct htab { /* Memory resident data structure */
/*
* Constants
*/
-#define MAX_BSIZE 65536 /* 2^16 */
+#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */
#define MIN_BUFFERS 6
#define MINHDRSIZE 512
#define DEF_BUFSIZE 65536 /* 64 K */