[Spice-devel] [PATCH spice-gtk] Replace getenv/setenv with g_getenv/g_setenv for Win32 portability

Daniel P. Berrange berrange at redhat.com
Thu Apr 26 02:08:08 PDT 2012


From: "Daniel P. Berrange" <berrange at redhat.com>

---
 gtk/spice-util.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gtk/spice-util.c b/gtk/spice-util.c
index fdea362..62c6549 100644
--- a/gtk/spice-util.c
+++ b/gtk/spice-util.c
@@ -49,12 +49,12 @@ void spice_util_set_debug(gboolean enabled)
 {
 #if GLIB_CHECK_VERSION(2, 31, 0)
     if (enabled) {
-        gchar *doms = getenv("G_MESSAGES_DEBUG");
+        gchar *doms = g_getenv("G_MESSAGES_DEBUG");
         if (!doms) {
-            setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
+            g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
         } else if (!strstr(doms, G_LOG_DOMAIN)) {
             gchar *newdoms = g_strdup_printf("%s %s", doms, G_LOG_DOMAIN);
-            setenv("G_MESSAGES_DEBUG", newdoms, 1);
+            g_setenv("G_MESSAGES_DEBUG", newdoms, 1);
             g_free(newdoms);
         }
     }
-- 
1.7.7.6



More information about the Spice-devel mailing list