From 67b9e9c4e8354a5f2075e41fa0d63f0b9b82d96a Mon Sep 17 00:00:00 2001 From: Sergio Costas Rodriguez Date: Wed, 22 Nov 2023 13:26:23 +0100 Subject: [PATCH] Move context variable definition inside block --- src/modules/module-protocol-pulse/snap-policy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/snap-policy.c b/src/modules/module-protocol-pulse/snap-policy.c index fcb1ed6b8..ebb5f29a8 100644 --- a/src/modules/module-protocol-pulse/snap-policy.c +++ b/src/modules/module-protocol-pulse/snap-policy.c @@ -49,7 +49,6 @@ pw_sandbox_access_t pw_snap_get_audio_permissions(struct client *client, int fd, gchar *separator = NULL; g_autofree gchar *aacon = NULL; gchar *aamode = NULL; - const char *context = NULL; g_autoptr(SnapdClient) snapdclient = NULL; g_autoptr(GPtrArray) plugs = NULL; 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"); /* Take context from the environment if available */ - context = g_getenv ("SNAP_COOKIE"); + const char *context = g_getenv ("SNAP_COOKIE"); if (!context) context = "";