The nested if condition can be joined with the outer one, removing
one indentation level.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
const char *path, const char **result_out)
{
char *result = libxl__xs_read(gc, t, path);
- if (!result) {
- if (errno != ENOENT) {
- LOGE(ERROR, "xenstore read failed: `%s'", path);
- return ERROR_FAIL;
- }
+ if (!result && errno != ENOENT) {
+ LOGE(ERROR, "xenstore read failed: `%s'", path);
+ return ERROR_FAIL;
}
*result_out = result;
return 0;