Message ID | c6ca6e060bf909e90284487b117df54adce4e4d8.1372234719.git.hutao@cn.fujitsu.com |
---|---|
State | New |
Headers | show |
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 401ee6e..7ae2061 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -239,7 +239,11 @@ void visit_type_int64(Visitor *v, int64_t *obj, const char *name, Error **errp) void visit_type_size(Visitor *v, uint64_t *obj, const char *name, Error **errp) { if (!error_is_set(errp)) { - (v->type_size ? v->type_size : v->type_uint64)(v, obj, name, errp); + if (v->type_size) { + v->type_size(v, obj, name, errp); + } else { + visit_type_uint64(v, obj, name, errp); + } } }