qapi-commands: Fix gen_err_check(e) for e and e != 'local_err'
gen_err_check() hard-codes 'local_err' instead of substituting the argument. Currently harmless, since all callers pass either None or 'local_err'. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9b090d42ae
commit
8102307f51
@ -29,14 +29,15 @@ def generate_command_decl(name, args, ret_type):
|
||||
ret_type=c_type(ret_type), name=c_name(name),
|
||||
args=arglist).strip()
|
||||
|
||||
def gen_err_check(errvar):
|
||||
if errvar:
|
||||
def gen_err_check(err):
|
||||
if not err:
|
||||
return ''
|
||||
return mcgen('''
|
||||
if (local_err) {
|
||||
if (%(err)s) {
|
||||
goto out;
|
||||
}
|
||||
''')
|
||||
return ''
|
||||
''',
|
||||
err=err)
|
||||
|
||||
def gen_sync_call(name, args, ret_type):
|
||||
ret = ""
|
||||
|
Loading…
Reference in New Issue
Block a user