From: Michal Privoznik Date: Mon, 17 Aug 2015 19:07:40 +0000 (+0200) Subject: virHashAddOrUpdateEntry: Turn @new_name into void * X-Git-Tag: v1.2.19-rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=890676d26b8a82d9840a59f3cb49a6f706a48cc5;p=thirdparty%2Flibvirt.git virHashAddOrUpdateEntry: Turn @new_name into void * 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 --- diff --git a/src/util/virhash.c b/src/util/virhash.c index 3cfcc696af..77196c927c 100644 --- a/src/util/virhash.c +++ b/src/util/virhash.c @@ -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;