[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 31/32] qapi: Clean up superfluous null check in qapi_
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 31/32] qapi: Clean up superfluous null check in qapi_dealloc_type_str() |
Date: |
Mon, 3 Mar 2014 12:12:22 -0500 |
From: Markus Armbruster <address@hidden>
Argument can't be null. No other Visitor method type_str() checks for
null.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
qapi/qapi-dealloc-visitor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index dc53545..d0ea118 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,
--
1.8.1.4
- [Qemu-devel] [PULL 17/32] qmp: Check for returned data from __json_read in get_events, (continued)
- [Qemu-devel] [PULL 17/32] qmp: Check for returned data from __json_read in get_events, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 19/32] monitor: Remove left-over code in do_info_profile., Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 18/32] qerror: Improve QERR_DEVICE_NOT_ACTIVE message, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 22/32] tests/qapi-schema: Cover simple argument types, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 20/32] tests/qapi-schema: Actually check successful QMP command response, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 21/32] tests/qapi-schema: Cover optional command arguments, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 24/32] tests/qapi-schema: Cover complex types with base, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 23/32] tests/qapi-schema: Cover anonymous union types, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 26/32] tests/qapi-schema: Cover flat union types, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 25/32] tests/qapi-schema: Cover union types with base, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 31/32] qapi: Clean up superfluous null check in qapi_dealloc_type_str(),
Luiz Capitulino <=
- [Qemu-devel] [PULL 29/32] qapi: Drop unused code in qapi-commands.py, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 27/32] qapi: Fix licensing of scripts, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 32/32] qapi: Add missing null check to opts_start_struct(), Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 28/32] qapi: Drop nonsensical header guard in generated qapi-visit.c, Luiz Capitulino, 2014/03/03
- [Qemu-devel] [PULL 30/32] qapi: Clean up null checking in generated visitors, Luiz Capitulino, 2014/03/03
- Re: [Qemu-devel] [PULL 00/32] QMP queue, Peter Maydell, 2014/03/04