[libvirt] [PATCH v2 1/3] virHashAddOrUpdateEntry: Tunr @new_name into void *

Martin Kletzander mkletzan at redhat.com
Mon Aug 17 21:26:29 UTC 2015


On Mon, Aug 17, 2015 at 11:16:27PM +0200, Michal Privoznik wrote:

s/Tunr/Turn/ in $SUBJ

>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 at redhat.com>
>---
> src/util/virhash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/util/virhash.c b/src/util/virhash.c
>index 3cfcc69..77196c9 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;
>--
>2.4.6
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150817/43ddfeaa/attachment-0001.sig>


More information about the libvir-list mailing list