qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]