]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qapi: Clean up superfluous null check in qapi_dealloc_type_str()
authorMarkus Armbruster <armbru@redhat.com>
Sat, 1 Mar 2014 07:40:38 +0000 (08:40 +0100)
committerLuiz Capitulino <lcapitulino@redhat.com>
Mon, 3 Mar 2014 16:17:45 +0000 (11:17 -0500)
Argument can't be null.  No other Visitor method type_str() checks for
null.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi/qapi-dealloc-visitor.c

index dc53545fa5a80ffd91f0c7aa73453682ef7975cd..d0ea118fe313266176ac78b89fe9c082412ff689 100644 (file)
@@ -131,9 +131,7 @@ static void qapi_dealloc_end_list(Visitor *v, Error **errp)
 static void qapi_dealloc_type_str(Visitor *v, char **obj, const char *name,
                                   Error **errp)
 {
-    if (obj) {
-        g_free(*obj);
-    }
+    g_free(*obj);
 }
 
 static void qapi_dealloc_type_int(Visitor *v, int64_t *obj, const char *name,