summaryrefslogtreecommitdiff
path: root/openbox/openbox.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-27 03:48:49 -0500
committerDana Jansens <danakj@orodu.net>2008-01-27 04:25:09 -0500
commita4d13100e67791955eef10876c6784748aff2fed (patch)
tree731ef5b6f5cd04f2ed42669447b0e246986e6120 /openbox/openbox.c
parent9a93350aa7bb124e39378eb0d67b7e0ca1a8a1df (diff)
use setenv/unsetenv instead of putenv, cuz they are not ugly and confusing wrt memory leaks
Diffstat (limited to 'openbox/openbox.c')
-rw-r--r--openbox/openbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c
index d1841437..18c34d2f 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -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)