Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/db/hash Account for the -1 hack to fit 0x10000 in a...
details: https://anonhg.NetBSD.org/src/rev/27864cf5862e
branches: trunk
changeset: 811836:27864cf5862e
user: christos <christos%NetBSD.org@localhost>
date: Wed Nov 18 13:00:46 2015 +0000
description:
Account for the -1 hack to fit 0x10000 in a short in hash_page.c
diffstat:
lib/libc/db/hash/hash.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 7eeccee1a518 -r 27864cf5862e lib/libc/db/hash/hash.c
--- a/lib/libc/db/hash/hash.c Wed Nov 18 10:26:57 2015 +0000
+++ b/lib/libc/db/hash/hash.c Wed Nov 18 13:00:46 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.36 2015/11/17 20:19:55 christos Exp $ */
+/* $NetBSD: hash.c,v 1.37 2015/11/18 13:00:46 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: hash.c,v 1.36 2015/11/17 20:19:55 christos Exp $");
+__RCSID("$NetBSD: hash.c,v 1.37 2015/11/18 13:00:46 christos Exp $");
#include "namespace.h"
#include <sys/param.h>
@@ -585,7 +585,7 @@
hash_accesses++;
#endif
- off = hashp->BSIZE;
+ off = hashp->BSIZE == MAX_BSIZE ? MAX_BSIZE - 1 : hashp->BSIZE;
size = key->size;
kp = (char *)key->data;
rbufp = __get_buf(hashp, __call_hash(hashp, kp, (int)size), NULL, 0);
Home |
Main Index |
Thread Index |
Old Index