]> Dogcows Code - chaz/openbox/blobdiff - openbox/openbox.c
use setenv/unsetenv instead of putenv, cuz they are not ugly and confusing wrt memory...
[chaz/openbox] / openbox / openbox.c
index d1841437cdc25e5f43e5d9b1b79d9c5eb4ea8ca4..18c34d2f9c47427ba67e6753f986a9ddc41006b8 100644 (file)
@@ -194,7 +194,7 @@ gint main(gint argc, gchar **argv)
 
     /* set the DISPLAY environment variable for any lauched children, to the
        display we're using, so they open in the right place. */
-    putenv(g_strdup_printf("DISPLAY=%s", DisplayString(ob_display)));
+    setenv("DISPLAY", DisplayString(ob_display), TRUE);
 
     /* create available cursors */
     cursors[OB_CURSOR_NONE] = None;
@@ -516,7 +516,7 @@ static void remove_args(gint *argc, gchar **argv, gint index, gint num)
 static void parse_env()
 {
     /* unset this so we don't pass it on unknowingly */
-    putenv(g_strdup("DESKTOP_STARTUP_ID"));
+    unsetenv("DESKTOP_STARTUP_ID");
 }
 
 static void parse_args(gint *argc, gchar **argv)
This page took 0.020032 seconds and 4 git commands to generate.