]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/execute: remove unneeded brackets
authorMike Yuan <me@yhndnzj.com>
Wed, 20 Dec 2023 13:11:26 +0000 (21:11 +0800)
committerMike Yuan <me@yhndnzj.com>
Wed, 20 Dec 2023 13:52:59 +0000 (21:52 +0800)
I did not merge the if-s, since I think it's easier to read
in the current form with those long socketpair() calls.

src/core/execute.c

index ef0bf88687411ed86ccb8a267a7294f94d034c42..3b223a3aceda50c861c8a15e566d746a8cc89fd8 100644 (file)
@@ -2094,15 +2094,13 @@ static int exec_shared_runtime_make(
                         return r;
         }
 
-        if (exec_needs_network_namespace(c)) {
+        if (exec_needs_network_namespace(c))
                 if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, netns_storage_socket) < 0)
                         return -errno;
-        }
 
-        if (exec_needs_ipc_namespace(c)) {
+        if (exec_needs_ipc_namespace(c))
                 if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, ipcns_storage_socket) < 0)
                         return -errno;
-        }
 
         r = exec_shared_runtime_add(m, id, &tmp_dir, &var_tmp_dir, netns_storage_socket, ipcns_storage_socket, ret);
         if (r < 0)