aboutsummaryrefslogtreecommitdiff
path: root/src/env-update.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-08 11:16:22 +0000
committerRoy Marples <roy@marples.name>2007-10-08 11:16:22 +0000
commitcd4bce7e8da691b8be0a88292eee13852b826b7e (patch)
tree26ab1fb49a790b8855b0dc60781551896c065931 /src/env-update.c
parenta89ceb7e2c994e2a3907d9c906d99021a6e15788 (diff)
Wups, should be xstrdup
Diffstat (limited to 'src/env-update.c')
-rw-r--r--src/env-update.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/env-update.c b/src/env-update.c
index e1367c2d..3df8af73 100644
--- a/src/env-update.c
+++ b/src/env-update.c
@@ -152,7 +152,7 @@ int env_update (int argc, char **argv)
entries = rc_config_load (path);
STRLIST_FOREACH (entries, entry, j) {
- char *tmpent = strdup (entry);
+ char *tmpent = xstrdup (entry);
char *value = tmpent;
char *var = strsep (&value, "=");
@@ -176,7 +176,7 @@ int env_update (int argc, char **argv)
eerrorx ("%s: nothing to process", applet);
STRLIST_FOREACH (config, entry, i) {
- char *tmpent = strdup (entry);
+ char *tmpent = xstrdup (entry);
char *value = tmpent;
char *var = strsep (&value, "=");
char *match;
@@ -220,7 +220,7 @@ int env_update (int argc, char **argv)
}
STRLIST_FOREACH (envs, env, j) {
- char *tmpenv = strdup (env);
+ char *tmpenv = xstrdup (env);
char *tmpvalue = tmpenv;
char *tmpentry = strsep (&tmpvalue, "=");
@@ -232,7 +232,7 @@ int env_update (int argc, char **argv)
"%s%s", colon ? ":" : " ", value);
} else {
free (envs[j - 1]);
- envs[j - 1] = strdup (entry);
+ envs[j - 1] = xstrdup (entry);
}
replaced = true;
}
@@ -256,7 +256,7 @@ int env_update (int argc, char **argv)
fprintf (fp, NOTICE, "/etc/profile", PROFILE_ENV);
STRLIST_FOREACH (envs, env, i) {
- char *tmpent = strdup (env);
+ char *tmpent = xstrdup (env);
char *value = tmpent;
char *var = strsep (&value, "=");
if (strcmp (var, "LDPATH") != 0) {
@@ -274,7 +274,7 @@ int env_update (int argc, char **argv)
fprintf (fp, NOTICE, "/etc/csh.cshrc", PROFILE_ENV);
STRLIST_FOREACH (envs, env, i) {
- char *tmpent = strdup (env);
+ char *tmpent = xstrdup (env);
char *value = tmpent;
char *var = strsep (&value, "=");
if (strcmp (var, "LDPATH") != 0) {