All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.
@ 2021-07-21  8:44 zhuguanghong
  2021-07-21 13:55 ` Marc-André Lureau
  0 siblings, 1 reply; 5+ messages in thread
From: zhuguanghong @ 2021-07-21  8:44 UTC (permalink / raw)
  To: pbonzini, berrange, ehabkost; +Cc: zhuguanghong, qemu-devel

Signed-off-by: zhuguanghong <zhuguanghong@uniontech.com>
---
 qom/object.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 6a01d56546..c8f5481afe 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -78,9 +78,7 @@ static GHashTable *type_table_get(void)
 {
     static GHashTable *type_table;
 
-    if (type_table == NULL) {
-        type_table = g_hash_table_new(g_str_hash, g_str_equal);
-    }
+    type_table = g_hash_table_new(g_str_hash, g_str_equal);
 
     return type_table;
 }
-- 
2.20.1





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-22  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  8:44 [PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it zhuguanghong
2021-07-21 13:55 ` Marc-André Lureau
2021-07-21 13:59   ` Daniel P. Berrangé
2021-07-22  9:15     ` [PATCH v2] " 朱光宏
2021-07-22  9:19       ` Daniel P. Berrangé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.