From fa274ed6fb788866ed3a2cfd54a2ddf78f04f2c0 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 13 Jul 2016 21:50:17 -0600 Subject: qapi: Drop useless gen_err_check() Ever since commit 12f254f removed the last parameterization of gen_err_check(), it no longer makes sense to hide the three lines of generated C code behind a macro call. Just inline it into the remaining users. No change to generated code. Signed-off-by: Eric Blake Message-Id: <1468468228-27827-7-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi-commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/qapi-commands.py') diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index c93470cf2a..333a46f623 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -46,8 +46,10 @@ def gen_call(name, arg_type, ret_type): ''', c_name=c_name(name), args=argstr, lhs=lhs) if ret_type: - ret += gen_err_check() ret += mcgen(''' + if (err) { + goto out; + } qmp_marshal_output_%(c_name)s(retval, ret, &err); ''', -- cgit 1.4.1