xen-devel
Re: [Xen-devel] [PATCH V2 02/11] libxl_json, Check the parser status bef
Anthony PERARD writes ("[Xen-devel] [PATCH V2 02/11] libxl_json, Check the
parse> - status = yajl_parse_complete(yajl_ctx.hand);
> + if (status == yajl_status_ok) {
> + status = yajl_parse_complete(yajl_ctx.hand);
> + }
Perhaps this would be better done with the "goto out" pattern ?
Ie:
status = yajl_do_something();
if (status != yajl_status_ok) goto out;
status = ....
....
return o;
out:
blah blah get_error blah blah
return NULL;
That would make the logic clearer I think.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH V2 06/11] libxl_qmp, Introduce list of arguments to qmp_send, (continued)
- [Xen-devel] [PATCH V2 06/11] libxl_qmp, Introduce list of arguments to qmp_send, Anthony PERARD
- [Xen-devel] [PATCH V2 07/11] libxl_qmp, Always insert a command id in the callback_list., Anthony PERARD
- [Xen-devel] [PATCH V2 10/11] libxl_qmp, Introduce libxl__qmp_pci_add., Anthony PERARD
- [Xen-devel] [PATCH V2 11/11] libxl, Use QMP to insert a passthrough device when using upstream QEMU, Anthony PERARD
- [Xen-devel] [PATCH V2 02/11] libxl_json, Check the parser status before to call parse_complete, Anthony PERARD
- Re: [Xen-devel] [PATCH V2 02/11] libxl_json, Check the parser status before to call parse_complete,
Ian Jackson <=
- [Xen-devel] [PATCH V2 08/11] libxl_qmp, Introduce qmp_request_handle., Anthony PERARD
- [Xen-devel] [PATCH V2 09/11] libxl_json, Handle number abrove LONG_MAX., Anthony PERARD
- [Xen-devel] [PATCH V2 05/11] libxl_qmp, Introduce an opaque argument to the callbacks., Anthony PERARD
|
|
|