blob: 4bbac576efb5f03c690287a8e043e049b1ea6586 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 143ea78cf3e14b9f9f7609e9fbb0a30635a92788 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Sun, 22 Nov 2015 18:13:01 +0100
Subject: [PATCH hurd 2/5] libihash: fix fast insertion corner case
* libihash/ihash.c (hurd_ihash_locp_add): Fix insertion if the key
doesn't match.
---
libihash/ihash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libihash/ihash.c b/libihash/ihash.c
index 8b1ad1f..598d341 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -267,6 +267,7 @@ hurd_ihash_locp_add (hurd_ihash_t ht, hurd_ihash_locp_t locp,
if (ht->size == 0
|| item == NULL
|| item->value == _HURD_IHASH_DELETED
+ || ! compare (ht, item->key, key)
|| hurd_ihash_get_load (ht) > ht->max_load)
return hurd_ihash_add (ht, key, value);
--
2.1.4
|