qemu-devel
[Top][All Lists]
Advanced

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

[PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant ,


From: zhuguanghong
Subject: [PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.
Date: Wed, 21 Jul 2021 16:44:46 +0800

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






reply via email to

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