From dd7c44929bf88c5a5c2fc8bf327eee8e6698df93 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 27 Jun 2019 10:27:07 +0200 Subject: [PATCH] libxl: remove one indentation level MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tools/libxl/libxl_xshelp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; -- 2.30.2