mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 23:49:36 +00:00
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 <akong@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
committed by
Luiz Capitulino
parent
0d14eeb233
commit
05dfb26cd2
@ -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)
|
||||
|
Reference in New Issue
Block a user