Message ID | 87h93ajgml.fsf@dusky.pond.sub.org |
---|---|
State | New |
Headers | show |
On 03/03/2017 01:37 PM, Markus Armbruster wrote: > Eric Blake <eblake@redhat.com> writes: > >> On 03/03/2017 06:32 AM, Markus Armbruster wrote: >>> The command registry encapsulates a single command list. Give the >>> functions using it a parameter instead. Define suitable command lists >>> in monitor, guest agent and test-qmp-commands. >>> >> ...or is this leftovers from your debugging? > > Corret. I'll drop it. > >> The rest of the patch looks fine; it is converting a global variable >> into a per-instance variable. > > Squashing in the obvious garbage collection. May I add your R-by? > Yes, with that squashed in, Reviewed-by: Eric Blake <eblake@redhat.com>
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 95a0f48..72827a3 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -67,9 +67,6 @@ static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp) return dict; } -volatile QmpCommand *save_cmd; -QmpCommand cmd2; - static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request, Error **errp) { @@ -97,9 +94,6 @@ static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request, return NULL; } - assert(!cmd->options & QCO_NO_SUCCESS_RESP); - save_cmd = cmd; - cmd2 = *cmd; if (!qdict_haskey(dict, "arguments")) { args = qdict_new(); } else { @@ -118,8 +112,6 @@ static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request, QDECREF(args); - assert(!cmd->options & QCO_NO_SUCCESS_RESP); - assert(ret || local_err); return ret; }