qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/7] do_device_add(): look up "device" opts list


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/7] do_device_add(): look up "device" opts list with qemu_find_opts_err()
Date: Tue, 05 Feb 2013 09:45:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

Il 05/02/2013 01:04, Laszlo Ersek ha scritto:
>> > list = qemu_find_opts_err("device", &local_err);
>> > if (error_is_set(&local_err)) {
>> >    /* handle error */
>> > }
>> > 
>> > opts = qemu_opts_from_qdict(..., &local_err);
>> > if (error_is_set(&local_err)) {
>> >    /* handle error */
>> > }
> /* handle error */ is exactly the same for both checks (print it, free
> it, bail out); I wanted to avoid duplicating that block. I'll redo it
> without the assignments in the controlling expression but will keep the
> handler block common if you don't mind.

Would a goto help?

Paolo



reply via email to

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