diff --git a/src/wrap.c b/src/wrap.c index 3094b6fa8d94f26d60e5af0e46ba914c8e1e8dbe..a621b73653e00e2ccb0eb60751d5046945046ae1 100644 --- a/src/wrap.c +++ b/src/wrap.c @@ -488,7 +488,6 @@ bind_runtime (FlatpakBwrap *bwrap, gboolean any_libc_from_host = FALSE; gboolean all_libc_from_host = TRUE; g_autofree gchar *localedef = NULL; - gboolean ret = FALSE; g_return_val_if_fail (tools_dir != NULL, FALSE); g_return_val_if_fail (runtime != NULL, FALSE); @@ -499,7 +498,7 @@ bind_runtime (FlatpakBwrap *bwrap, usr = g_build_filename (runtime, "usr", NULL); if (!pv_bwrap_bind_usr (bwrap, runtime, "/", error)) - goto out; + return FALSE; flatpak_bwrap_add_args (bwrap, "--setenv", "XDG_RUNTIME_DIR", xrd, @@ -629,7 +628,7 @@ bind_runtime (FlatpakBwrap *bwrap, NULL); if (!pv_bwrap_bind_usr (temp_bwrap, runtime, "/", error)) - goto out; + return FALSE; flatpak_bwrap_add_args (temp_bwrap, "readlink", "-e", ld_so, @@ -665,7 +664,7 @@ bind_runtime (FlatpakBwrap *bwrap, NULL); if (!pv_bwrap_bind_usr (mount_runtime_on_scratch, runtime, scratch, error)) - goto out; + return FALSE; temp_bwrap = flatpak_bwrap_new (NULL); /* mount_runtime_on_scratch can't own any fds, because if it did, @@ -684,7 +683,7 @@ bind_runtime (FlatpakBwrap *bwrap, flatpak_bwrap_finish (temp_bwrap); if (!pv_bwrap_run_sync (temp_bwrap, NULL, error)) - goto out; + return FALSE; g_clear_pointer (&temp_bwrap, flatpak_bwrap_free); @@ -709,7 +708,7 @@ bind_runtime (FlatpakBwrap *bwrap, NULL); if (!pv_bwrap_bind_usr (temp_bwrap, runtime, "/", error)) - goto out; + return FALSE; flatpak_bwrap_add_args (temp_bwrap, "readlink", "-f", ld_so, @@ -739,7 +738,7 @@ bind_runtime (FlatpakBwrap *bwrap, flatpak_bwrap_finish (temp_bwrap); if (!pv_bwrap_run_sync (temp_bwrap, NULL, error)) - goto out; + return FALSE; g_clear_pointer (&temp_bwrap, flatpak_bwrap_free); @@ -767,7 +766,7 @@ bind_runtime (FlatpakBwrap *bwrap, if (!try_bind_dri (bwrap, mount_runtime_on_scratch, overrides, scratch, tool_path, dirs[j], libdir_on_host, error)) - goto out; + return FALSE; } } else @@ -795,7 +794,7 @@ bind_runtime (FlatpakBwrap *bwrap, "the host system and the container (tried: %s)", archs->str); g_string_free (archs, TRUE); - goto out; + return FALSE; } if (any_libc_from_host && !all_libc_from_host) @@ -855,7 +854,7 @@ bind_runtime (FlatpakBwrap *bwrap, } if (!pv_bwrap_bind_usr (bwrap, "/", "/run/host", error)) - goto out; + return FALSE; ensure_locales (any_libc_from_host, tools_dir, bwrap, overrides); @@ -926,10 +925,7 @@ bind_runtime (FlatpakBwrap *bwrap, NULL); } - ret = TRUE; - -out: - return ret; + return TRUE; } /* Order matters here: root, steam and steambeta are or might be symlinks