Cleanup getenv(3) by GLib compatible functions.
[udpgate.git] / src / configuration.c
index 8be581b..4d80328 100644 (file)
@@ -24,6 +24,7 @@
 #include <glib/gstring.h>
 #include <glib/gmem.h>
 #include <glib/gstrfuncs.h>
+#include <glib/gutils.h>
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
@@ -54,8 +55,8 @@ static const gchar *static_pathname;
                        G_STRINGIFY(SYSCONFDIR) "/sysconfig",PACKAGE,
                        G_STRINGIFY(SYSCONFDIR) "/default",PACKAGE,
                        G_STRINGIFY(SYSCONFDIR) "",PACKAGE,
-                       /* 'getenv("HOME")' may return NULL and terminate the list prematurely. */
-                       getenv("HOME"),"." PACKAGE "rc",
+                       /* g_get_home_dir() may return NULL and terminate the list prematurely. */
+                       g_get_home_dir(),"." PACKAGE "rc",
                        NULL);
 }