aboutsummaryrefslogtreecommitdiffstats
path: root/src/Daemon.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-15 18:36:36 +0100
committerMax Kellermann <max@duempel.org>2013-12-15 18:43:12 +0100
commit0db0b4e302f82165b763da7717059911a85c370f (patch)
tree1bba81b87264c3f874eb714ca7dd72cd3c068346 /src/Daemon.cxx
parent635d6a19efc61fb59fc51fc280f239501bb9c2d4 (diff)
downloadmpd-0db0b4e302f82165b763da7717059911a85c370f.tar.gz
mpd-0db0b4e302f82165b763da7717059911a85c370f.tar.xz
mpd-0db0b4e302f82165b763da7717059911a85c370f.zip
Daemon: use strdup() instead of g_strdup()
Diffstat (limited to '')
-rw-r--r--src/Daemon.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Daemon.cxx b/src/Daemon.cxx
index 1061cce27..6fc0f2d7c 100644
--- a/src/Daemon.cxx
+++ b/src/Daemon.cxx
@@ -25,8 +25,6 @@
#include "util/Domain.hxx"
#include "Log.hxx"
-#include <glib.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -209,10 +207,10 @@ daemonize_init(const char *user, const char *group, AllocatedPath &&_pidfile)
user_uid = pwd->pw_uid;
user_gid = pwd->pw_gid;
- user_name = g_strdup(user);
+ user_name = strdup(user);
/* this is needed by libs such as arts */
- g_setenv("HOME", pwd->pw_dir, true);
+ setenv("HOME", pwd->pw_dir, true);
}
if (group) {
@@ -235,7 +233,7 @@ daemonize_finish(void)
pidfile = AllocatedPath::Null();
}
- g_free(user_name);
+ free(user_name);
}
#endif