[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/9] monitor/hmp-cmds: delete redundant Error check before in
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH 5/9] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error() |
Date: |
Thu, 11 Jun 2020 19:52:03 +0100 |
User-agent: |
Mutt/1.14.0 (2020-05-02) |
* Mao Zhongyi (maozhongyi@cmss.chinamobile.com) wrote:
> hmp_handle_error() does Error check internally.
>
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> monitor/hmp-cmds.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> index 6938f1060e..acdd6baff3 100644
> --- a/monitor/hmp-cmds.c
> +++ b/monitor/hmp-cmds.c
> @@ -1636,9 +1636,8 @@ void hmp_object_add(Monitor *mon, const QDict *qdict)
> obj = user_creatable_add_opts(opts, &err);
> qemu_opts_del(opts);
>
> - if (err) {
> - hmp_handle_error(mon, err);
> - }
> + hmp_handle_error(mon, err);
> +
> if (obj) {
> object_unref(obj);
> }
> --
> 2.17.1
>
>
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
- [PATCH 0/9] monitor/hmp-cmds: small improvements for migration, Mao Zhongyi, 2020/06/03
- [PATCH 6/9] monitor/hmp-cmds: add 'goto end' to reduce duplicate code., Mao Zhongyi, 2020/06/03
- [PATCH 5/9] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error(), Mao Zhongyi, 2020/06/03
- Re: [PATCH 5/9] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error(),
Dr. David Alan Gilbert <=
- [PATCH 4/9] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails, Mao Zhongyi, 2020/06/03
- [PATCH 9/9] migration/ram: calculate un/encoded_size only when needed., Mao Zhongyi, 2020/06/03
- [PATCH 2/9] tests/migration: fix unreachable path in stress test, Mao Zhongyi, 2020/06/03
- [PATCH 7/9] monitor/hmp-cmds: improvements for the 'info migrate', Mao Zhongyi, 2020/06/03
- [PATCH 3/9] monitor/hmp-cmds: add units for migrate_parameters, Mao Zhongyi, 2020/06/03
- [PATCH 8/9] docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs, Mao Zhongyi, 2020/06/03