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