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 When deleting a big key, the offset of an e...
details: https://anonhg.NetBSD.org/src/rev/e020fe8587a4
branches: trunk
changeset: 475006:e020fe8587a4
user: mycroft <mycroft%NetBSD.org@localhost>
date: Thu Jul 29 07:48:03 1999 +0000
description:
When deleting a big key, the offset of an empty page should be bsize, not
bsize-1; otherwise an insertion into the empty page will cause the new key to
be elongated by 1 byte.
diffstat:
lib/libc/db/hash/hash_bigkey.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ecc674bf670c -r e020fe8587a4 lib/libc/db/hash/hash_bigkey.c
--- a/lib/libc/db/hash/hash_bigkey.c Thu Jul 29 04:07:27 1999 +0000
+++ b/lib/libc/db/hash/hash_bigkey.c Thu Jul 29 07:48:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hash_bigkey.c,v 1.13 1999/07/29 01:12:57 mycroft Exp $ */
+/* $NetBSD: hash_bigkey.c,v 1.14 1999/07/29 07:48:03 mycroft Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94";
#else
-__RCSID("$NetBSD: hash_bigkey.c,v 1.13 1999/07/29 01:12:57 mycroft Exp $");
+__RCSID("$NetBSD: hash_bigkey.c,v 1.14 1999/07/29 07:48:03 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -264,7 +264,7 @@
n -= 2;
bp[0] = n;
FREESPACE(bp) = hashp->BSIZE - PAGE_META(n);
- OFFSET(bp) = hashp->BSIZE - 1;
+ OFFSET(bp) = hashp->BSIZE;
bufp->flags |= BUF_MOD;
if (rbufp)
Home |
Main Index |
Thread Index |
Old Index