Move context variable definition inside block

This commit is contained in:
Sergio Costas Rodriguez 2023-11-22 13:26:23 +01:00 committed by Wim Taymans
parent 18d0e2e850
commit 67b9e9c4e8

View file

@ -49,7 +49,6 @@ pw_sandbox_access_t pw_snap_get_audio_permissions(struct client *client, int fd,
gchar *separator = NULL; gchar *separator = NULL;
g_autofree gchar *aacon = NULL; g_autofree gchar *aacon = NULL;
gchar *aamode = NULL; gchar *aamode = NULL;
const char *context = NULL;
g_autoptr(SnapdClient) snapdclient = NULL; g_autoptr(SnapdClient) snapdclient = NULL;
g_autoptr(GPtrArray) plugs = NULL; g_autoptr(GPtrArray) plugs = NULL;
gboolean retv; gboolean retv;
@ -111,7 +110,7 @@ pw_sandbox_access_t pw_snap_get_audio_permissions(struct client *client, int fd,
snapd_client_set_socket_path (snapdclient, "/run/snapd-snap.socket"); snapd_client_set_socket_path (snapdclient, "/run/snapd-snap.socket");
/* Take context from the environment if available */ /* Take context from the environment if available */
context = g_getenv ("SNAP_COOKIE"); const char *context = g_getenv ("SNAP_COOKIE");
if (!context) if (!context)
context = ""; context = "";