From: Roger Pau Monne Date: Thu, 27 Jun 2019 08:27:07 +0000 (+0200) Subject: libxl: remove one indentation level X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1978 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dd7c44929bf88c5a5c2fc8bf327eee8e6698df93;p=xen.git libxl: remove one indentation level The nested if condition can be joined with the outer one, removing one indentation level. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c index c4a18df353..751cd942d9 100644 --- a/tools/libxl/libxl_xshelp.c +++ b/tools/libxl/libxl_xshelp.c @@ -209,11 +209,9 @@ int libxl__xs_read_checked(libxl__gc *gc, xs_transaction_t t, 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;