summaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-03-01 08:40:38 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2014-03-03 11:17:45 -0500
commit25a7017555f1b4aeb543b5d323ff4afb8f9c5437 (patch)
tree93e6343ec185840c65806c7ead2dca83d5e170f0 /qapi
parent949ceeb31b84dce43e4619b6d7f02cac0e62e1e1 (diff)
downloadqemu-25a7017555f1b4aeb543b5d323ff4afb8f9c5437.zip
qapi: Clean up superfluous null check in qapi_dealloc_type_str()
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>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qapi-dealloc-visitor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index dc53545fa5..d0ea118fe3 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -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,