mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
740d6c4eba
commit
05e385d2a9
5 changed files with 6 additions and 8 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue