|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2 02/11] libxl_json, Check the parser status before to call parse_complete
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |