libxl: remove one indentation level
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 27 Jun 2019 08:27:07 +0000 (10:27 +0200)
committerWei Liu <liuw@liuw.name>
Fri, 28 Jun 2019 10:54:52 +0000 (11:54 +0100)
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>
tools/libxl/libxl_xshelp.c

index c4a18df353acb1da49cb35e149b42ee00fcb4773..751cd942d95334191885ba3e8e45b77f7de82e34 100644 (file)
@@ -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;