[vino] vino_background_draw: Make 'initialised' static



commit 867d54d148534dd7a0f2219238161091b39efb92
Author: Søren Sandmann <ssp redhat com>
Date:   Tue Jan 7 15:24:38 2014 -0500

    vino_background_draw: Make 'initialised' static
    
    The variable 'initialised' is used with g_once_init_enter() to guard the
    initialization of the 'background_settings' variable. For this to work,
    the 'initialised' variable must be static; otherwise it will be
    unpredictable whether 'background_settings' is initialized or not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721725

 server/vino-server.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/server/vino-server.c b/server/vino-server.c
index a3edf9d..8becd52 100644
--- a/server/vino-server.c
+++ b/server/vino-server.c
@@ -294,7 +294,7 @@ static void
 vino_background_draw (gboolean status)
 {
   static GSettings *background_settings;
-  gsize initialised;
+  static gsize initialised;
 
   if (g_once_init_enter (&initialised))
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]