From 05dfb26cd2bf3f50a0fbf08a68a3bd415301edc5 Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Tue, 10 Jun 2014 19:25:53 +0800 Subject: qapi: Suppress unwanted space between type and identifier We always generate a space between type and identifier in parameter and variable declarations, even when idiomatic C style doesn't have a space there. Suppress it. Signed-off-by: Amos Kong Signed-off-by: Luiz Capitulino --- scripts/qapi-commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/qapi-commands.py') diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 34f200a..053ba85 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -102,7 +102,7 @@ def gen_visitor_input_vars_decl(args): bool has_%(argname)s = false; ''', argname=c_var(argname)) - if c_type(argtype).endswith("*"): + if is_c_ptr(argtype): ret += mcgen(''' %(argtype)s %(argname)s = NULL; ''', @@ -227,7 +227,7 @@ def gen_marshal_input(name, args, ret_type, middle_mode): ''') if ret_type: - if c_type(ret_type).endswith("*"): + if is_c_ptr(ret_type): retval = " %s retval = NULL;" % c_type(ret_type) else: retval = " %s retval;" % c_type(ret_type) -- cgit v1.1