aboutsummaryrefslogtreecommitdiff
path: root/monitor/qmp-cmds.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-11-21 09:50:47 +0100
committerMarkus Armbruster <armbru@redhat.com>2022-12-14 16:19:35 +0100
commit05e385d2a96325c1f26b874f1b832237229b8c1f (patch)
tree3e17519074c633ebc1f2875b215677788e52e4ab /monitor/qmp-cmds.c
parent740d6c4eba8bb44ea00550ccc97a4c49945ecc3c (diff)
error: Move ERRP_GUARD() to the beginning of the function
include/qapi/error.h advises to put ERRP_GUARD() right at the beginning of the function, because only then can it guard the whole function. Clean up the few spots disregarding the advice. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20221121085054.683122-4-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'monitor/qmp-cmds.c')
-rw-r--r--monitor/qmp-cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 81c8fdadf8..686d562cad 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -474,9 +474,9 @@ static bool invoke_stats_cb(StatsCallbacks *entry,
StatsFilter *filter, StatsRequest *request,
Error **errp)
{
+ ERRP_GUARD();
strList *targets = NULL;
strList *names = NULL;
- ERRP_GUARD();
if (request) {
if (request->provider != entry->provider) {
@@ -541,9 +541,9 @@ StatsSchemaList *qmp_query_stats_schemas(bool has_provider,
StatsProvider provider,
Error **errp)
{
+ ERRP_GUARD();
StatsSchemaList *stats_results = NULL;
StatsCallbacks *entry;
- ERRP_GUARD();
QTAILQ_FOREACH(entry, &stats_callbacks, next) {
if (!has_provider || provider == entry->provider) {