Commit 5deb98a5 authored by David Zeuthen's avatar David Zeuthen
Browse files

Always pass non-zero value to g_once_init_leave()


Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent c6ab7b99
......@@ -63,14 +63,15 @@
static gboolean
_show_debug (void)
{
static gsize show_debug = 0;
if (g_once_init_enter (&show_debug))
static volatile gsize has_show_debug = 0;
static gboolean show_debug_value = FALSE;
if (g_once_init_enter (&has_show_debug))
{
gsize v;
v = g_getenv ("POLKIT_DEBUG") != NULL;
g_once_init_leave (&show_debug, v);
show_debug_value = (g_getenv ("POLKIT_DEBUG") != NULL);
g_once_init_leave (&has_show_debug, 1);
}
return show_debug;
return show_debug_value;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment