diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-03-01 08:40:37 +0100 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-03-03 11:17:20 -0500 |
commit | 949ceeb31b84dce43e4619b6d7f02cac0e62e1e1 (patch) | |
tree | fbd613c5373975792434e31a02e760f78bd6031d /target-m68k/helper.h | |
parent | 56bed4135f139721d42992da3924786282bb0286 (diff) |
qapi: Clean up null checking in generated visitors
Visitors get passed a pointer to the visited object. The generated
visitors try to cope with this pointer being null in some places, for
instance like this:
visit_start_optional(m, obj ? &(*obj)->has_name : NULL, "name", &err);
visit_start_optional() passes its second argument to Visitor method
start_optional. Three out of three methods dereference it
unconditionally.
I fail to see how this pointer could legitimately be null.
All this useless null checking is highly redundant, which Coverity
duly reports. About 200 times.
Remove the useless null checks.
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 'target-m68k/helper.h')
0 files changed, 0 insertions, 0 deletions