commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 02/14: libihash: fix corner case


From: Samuel Thibault
Subject: [hurd] 02/14: libihash: fix corner case
Date: Sun, 22 May 2016 01:15:21 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 8d4db629aa10189d3a545ec1639105cfb9bae650
Author: Justus Winter <address@hidden>
Date:   Sat Apr 30 00:03:40 2016 +0200

    libihash: fix corner case
    
    * libihash/ihash.c (hurd_ihash_locp_find): Set SLOT to NULL if the
    hash table has not been allocated.
---
 libihash/ihash.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libihash/ihash.c b/libihash/ihash.c
index ae1cf12..c6143a5 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -418,7 +418,10 @@ hurd_ihash_locp_find (hurd_ihash_t ht,
   int idx;
 
   if (ht->size == 0)
-    return NULL;
+    {
+      *slot = NULL;
+      return NULL;
+    }
 
   idx = find_index (ht, key);
   *slot = &ht->items[idx].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]