aboutsummaryrefslogtreecommitdiff
path: root/src/librc-daemon.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-19 14:54:35 +0000
committerRoy Marples <roy@marples.name>2007-04-19 14:54:35 +0000
commit2569e85579bc5c7d676865b386398119f04a5912 (patch)
tree41724e54856c9323b53428e49258f56f1102c0ed /src/librc-daemon.c
parent3ed60d52026c484dce2d1856ea3bb893b8ee7d92 (diff)
strdup -> rc_xstrdup
Diffstat (limited to 'src/librc-daemon.c')
-rw-r--r--src/librc-daemon.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librc-daemon.c b/src/librc-daemon.c
index 23dfc01a..b59460dd 100644
--- a/src/librc-daemon.c
+++ b/src/librc-daemon.c
@@ -305,21 +305,21 @@ void rc_set_service_daemon (const char *service, const char *exec,
mexec = rc_xmalloc (sizeof (char *) * i);
snprintf (mexec, i, "exec=%s", exec);
} else
- mexec = strdup ("exec=");
+ mexec = rc_xstrdup ("exec=");
if (name) {
i = strlen (name) + 6;
mname = rc_xmalloc (sizeof (char *) * i);
snprintf (mname, i, "name=%s", name);
} else
- mname = strdup ("name=");
+ mname = rc_xstrdup ("name=");
if (pidfile) {
i = strlen (pidfile) + 9;
mpidfile = rc_xmalloc (sizeof (char *) * i);
snprintf (mpidfile, i, "pidfile=%s", pidfile);
} else
- mpidfile = strdup ("pidfile=");
+ mpidfile = rc_xstrdup ("pidfile=");
/* Regardless, erase any existing daemon info */
if (rc_is_dir (dirpath)) {
@@ -479,15 +479,15 @@ bool rc_service_daemons_crashed (const char *service)
if (strcmp (token, "exec") == 0) {
if (exec)
free (exec);
- exec = strdup (p);
+ exec = rc_xstrdup (p);
} else if (strcmp (token, "name") == 0) {
if (name)
free (name);
- name = strdup (p);
+ name = rc_xstrdup (p);
} else if (strcmp (token, "pidfile") == 0) {
if (pidfile)
free (pidfile);
- pidfile = strdup (p);
+ pidfile = rc_xstrdup (p);
}
}
fclose (fp);