qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] qom/object.c 'if (type_table == NULL)' statement is redun


From: Daniel P . Berrangé
Subject: Re: [PATCH v2] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.
Date: Thu, 22 Jul 2021 10:19:35 +0100
User-agent: Mutt/2.0.7 (2021-05-04)

On Thu, Jul 22, 2021 at 05:15:46PM +0800, 朱光宏 wrote:
>  Hi
> Signed-off-by: zhuguanghong <zhuguanghong@uniontech.com&gt;
> ---
> &nbsp;qom/object.c | 4 ++++
> &nbsp;1 file changed, 4 insertions(+)
> 
> 
> diff --git a/qom/object.c b/qom/object.c
> index 6a01d56546..dc0a363ed0 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -73,15 +73,19 @@ struct TypeImpl
> &nbsp;};
> 
> 
> &nbsp;static Type type_interface;
> +G_LOCK_DEFINE (GHashTable_mutex);
> 
> 
> &nbsp;static GHashTable *type_table_get(void)
> &nbsp;{
> &nbsp; &nbsp; &nbsp;static GHashTable *type_table;
> +&nbsp; &nbsp; G_LOCK ( GHashTable_mutex);&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
> 
> 
> &nbsp; &nbsp; &nbsp;if (type_table == NULL) {
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;type_table = g_hash_table_new(g_str_hash, 
> g_str_equal);
> &nbsp; &nbsp; &nbsp;}
> 
> 
> +&nbsp; &nbsp; G_UNLOCK ( GHashTable_mutex);&nbsp; &nbsp; &nbsp;&nbsp;
> +
> &nbsp; &nbsp; &nbsp;return type_table;
> &nbsp;}

Please could you check your mail client settings so that it correctly
sends *plain* text messages.  This is a multipart text/plain+text/html
message, but the text/plain part is full of HTML entities. This makes
your messages almost impossible to read and reply to.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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