Skip to content
Snippets Groups Projects
Commit bd36701d authored by Simon McVittie's avatar Simon McVittie
Browse files

_srt_get_helpers_path: Rename global variable


This gets it out of the way of a future function that takes a
helpers_path argument.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 6be80b41
No related branches found
No related tags found
1 merge request!77Look for vulkaninfo, wflinfo in SRT_HELPERS_PATH
...@@ -145,7 +145,7 @@ _srt_check_not_setuid (void) ...@@ -145,7 +145,7 @@ _srt_check_not_setuid (void)
return !is_setuid; return !is_setuid;
} }
static gchar *helpers_path = NULL; static gchar *global_helpers_path = NULL;
G_GNUC_INTERNAL const char * G_GNUC_INTERNAL const char *
_srt_get_helpers_path (GError **error) _srt_get_helpers_path (GError **error)
...@@ -158,7 +158,7 @@ _srt_get_helpers_path (GError **error) ...@@ -158,7 +158,7 @@ _srt_get_helpers_path (GError **error)
g_return_val_if_fail (_srt_check_not_setuid (), NULL); g_return_val_if_fail (_srt_check_not_setuid (), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL);
path = helpers_path; path = global_helpers_path;
if (path != NULL) if (path != NULL)
goto out; goto out;
...@@ -198,10 +198,10 @@ _srt_get_helpers_path (GError **error) ...@@ -198,10 +198,10 @@ _srt_get_helpers_path (GError **error)
} }
/* deliberate one-per-process leak */ /* deliberate one-per-process leak */
helpers_path = g_build_filename ( global_helpers_path = g_build_filename (
dir, "libexec", "steam-runtime-tools-" _SRT_API_MAJOR, dir, "libexec", "steam-runtime-tools-" _SRT_API_MAJOR,
NULL); NULL);
path = helpers_path; path = global_helpers_path;
g_free (dir); g_free (dir);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment