diff options
author | Roy Marples <roy@marples.name> | 2007-10-08 11:16:22 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-08 11:16:22 +0000 |
commit | cd4bce7e8da691b8be0a88292eee13852b826b7e (patch) | |
tree | 26ab1fb49a790b8855b0dc60781551896c065931 /src/rc.c | |
parent | a89ceb7e2c994e2a3907d9c906d99021a6e15788 (diff) |
Wups, should be xstrdup
Diffstat (limited to 'src/rc.c')
-rw-r--r-- | src/rc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -205,7 +205,7 @@ static int do_e (int argc, char **argv) } if (message) - fmt = strdup ("%s"); + fmt = xstrdup ("%s"); if (strcmp (applet, "einfo") == 0) einfo (fmt, message); @@ -406,7 +406,7 @@ static char *proc_getent (const char *ent) p += strlen (ent); if (*p == '=') p++; - value = strdup (strsep (&p, " ")); + value = xstrdup (strsep (&p, " ")); } } else errno = ENOENT; @@ -757,7 +757,7 @@ int main (int argc, char **argv) atexit (cleanup); if (argv[0]) - applet = strdup (basename (argv[0])); + applet = xstrdup (basename (argv[0])); if (! applet) eerrorx ("arguments required"); @@ -858,7 +858,7 @@ int main (int argc, char **argv) some kernels bitch about this according to the environ man pages so we walk though environ and call unsetenv for each value. */ while (environ[0]) { - tmp = strdup (environ[0]); + tmp = xstrdup (environ[0]); p = tmp; var = strsep (&p, "="); unsetenv (var); @@ -1310,7 +1310,7 @@ int main (int argc, char **argv) if (newlevel) { rc_runlevel_set (newlevel); free (runlevel); - runlevel = strdup (newlevel); + runlevel = xstrdup (newlevel); setenv ("RC_SOFTLEVEL", runlevel, 1); } |