[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 14/16] net: net_client_init(): use error_set()
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH 14/16] net: net_client_init(): use error_set() |
Date: |
Fri, 18 May 2012 17:09:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120422 Thunderbird/10.0.4 |
On 05/17/12 16:33, Luiz Capitulino wrote:
> @@ -1244,8 +1247,10 @@ int do_netdev_add(Monitor *mon, const QDict *qdict,
> QObject **ret_data)
> return -1;
> }
>
> - res = net_client_init(opts, 1);
> + res = net_client_init(opts, 1, &local_err);
> if (res < 0) {
> + qerror_report_err(local_err);
> + error_free(local_err);
> qemu_opts_del(opts);
> }
>
I think this is the only net_client_init() caller hunk where we rely on
the retval instead of error_is_set(); but again, they seem to be
equivalent -- all branches in net_client_init() have been converted AFAICS.
(I can see that do_netdev_add() might set "local_err" higher up, and
then check "opts" again, instead of error_is_set(), but
qemu_opts_from_qdict() returns/sets those equivalently as well, so we
could use error_is_set() both times in do_netdev_add(), I think. Anyway,
it's OK.)
Laszlo
- Re: [Qemu-devel] [PATCH 04/16] qemu-option: parse_option_size(): use error_set(), (continued)
- [Qemu-devel] [PATCH 13/16] net: purge the monitor object from all init functions, Luiz Capitulino, 2012/05/17
- [Qemu-devel] [PATCH 11/16] qemu-config: find_list(): use error_set(), Luiz Capitulino, 2012/05/17
- [Qemu-devel] [PATCH 15/16] qapi: convert netdev_add, Luiz Capitulino, 2012/05/17
- [Qemu-devel] [PATCH 16/16] qapi: convert netdev_del, Luiz Capitulino, 2012/05/17
- [Qemu-devel] [PATCH 12/16] qemu-config: introduce qemu_find_opts_err(), Luiz Capitulino, 2012/05/17
- [Qemu-devel] [PATCH 06/16] qemu-option: qemu_opts_validate(): use error_set(), Luiz Capitulino, 2012/05/17
- [Qemu-devel] [PATCH 14/16] net: net_client_init(): use error_set(), Luiz Capitulino, 2012/05/17
- Re: [Qemu-devel] [PATCH 14/16] net: net_client_init(): use error_set(),
Laszlo Ersek <=