commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 26/75: libihash: fix fast insertion corner case


From: Samuel Thibault
Subject: [hurd] 26/75: libihash: fix fast insertion corner case
Date: Thu, 14 Jan 2016 01:04:07 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch dde
in repository hurd.

commit f564e5f4a62fb8ca54695c722c7e04803df869ec
Author: Justus Winter <address@hidden>
Date:   Sun Nov 22 18:13:01 2015 +0100

    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);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]