[gnome-session] gsm-util: Use g_unsetenv() rather than g_setenv(variable, NULL)



commit c9fd5b00cbf5b0b7820325e21dfcbe8f251cf7d2
Author: Colin Walters <walters verbum org>
Date:   Mon Oct 21 16:11:28 2013 -0400

    gsm-util: Use g_unsetenv() rather than g_setenv(variable, NULL)
    
    This way we don't emit a critical with newer glibs.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=704593
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710582

 gnome-session/gsm-util.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c
index b4036f6..a2fe354 100644
--- a/gnome-session/gsm-util.c
+++ b/gnome-session/gsm-util.c
@@ -537,7 +537,10 @@ gsm_util_setenv (const char *variable,
 {
         GError *bus_error;
 
-        g_setenv (variable, value, TRUE);
+        if (!value)
+                g_unsetenv (variable);
+        else
+                g_setenv (variable, value, TRUE);
 
         bus_error = NULL;
 


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