]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virHashAddOrUpdateEntry: Turn @new_name into void *
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Aug 2015 19:07:40 +0000 (21:07 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Aug 2015 21:25:01 +0000 (23:25 +0200)
In 9190f0b0 we've tried to fix an OOM. And boy, was that fix
successful. But back then, the hash table implementation worked
strictly over string keys, which is not the case anymore. Hash
table have this function keyCopy() which returns void *.
Therefore a local variable that is temporarily holding the
intermediate return value from that function should be void *
too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virhash.c

index 3cfcc696afb5aa1df4b9ac0ceec0fb1fd7c2ff38..77196c927c98aaca530e3bb532a7f463d524278a 100644 (file)
@@ -334,7 +334,7 @@ virHashAddOrUpdateEntry(virHashTablePtr table, const void *name,
 {
     size_t key, len = 0;
     virHashEntryPtr entry;
-    char *new_name;
+    void *new_name;
 
     if ((table == NULL) || (name == NULL))
         return -1;