Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/lib/libc/cdb Pull up revision 1.5 (requested by joerg in ...
details: https://anonhg.NetBSD.org/src/rev/5e143438f02c
branches: netbsd-6
changeset: 774360:5e143438f02c
user: jdc <jdc%NetBSD.org@localhost>
date: Wed Jul 25 20:50:44 2012 +0000
description:
Pull up revision 1.5 (requested by joerg in ticket #436).
Redo hashing, if two of the three individual hashes result in identical
hash modules. This is the trivial case for loops in the 3-graph and got
lost when adopting the nbperf code.
diffstat:
lib/libc/cdb/cdbw.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 0666b7b2f412 -r 5e143438f02c lib/libc/cdb/cdbw.c
--- a/lib/libc/cdb/cdbw.c Wed Jul 25 20:45:23 2012 +0000
+++ b/lib/libc/cdb/cdbw.c Wed Jul 25 20:50:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cdbw.c,v 1.1.8.1 2012/06/23 22:54:58 riz Exp $ */
+/* $NetBSD: cdbw.c,v 1.1.8.2 2012/07/25 20:50:44 jdc Exp $ */
/*-
* Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -36,7 +36,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cdbw.c,v 1.1.8.1 2012/06/23 22:54:58 riz Exp $");
+__RCSID("$NetBSD: cdbw.c,v 1.1.8.2 2012/07/25 20:50:44 jdc Exp $");
#include "namespace.h"
@@ -387,6 +387,13 @@
e->middle = hashes[1] % state->entries;
e->right = hashes[2] % state->entries;
+ if (e->left == e->middle)
+ return -1;
+ if (e->left == e->right)
+ return -1;
+ if (e->middle == e->right)
+ return -1;
+
++e;
}
}
Home |
Main Index |
Thread Index |
Old Index