aboutsummaryrefslogtreecommitdiff
path: root/src/env-update.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-08 11:11:21 +0000
committerRoy Marples <roy@marples.name>2007-10-08 11:11:21 +0000
commita89ceb7e2c994e2a3907d9c906d99021a6e15788 (patch)
tree5725e344e99804953472a29598eb8c3e04d95c7a /src/env-update.c
parente7dab9bb91344476603cc01a9db95c891e01085d (diff)
Punt rc_ from xstrdup, xalloc, xrealloc and exists as they're not in librc anymore
Diffstat (limited to 'src/env-update.c')
-rw-r--r--src/env-update.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/env-update.c b/src/env-update.c
index 1ee13eff..e1367c2d 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 = rc_xstrdup (entry);
+ char *tmpent = strdup (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 = rc_xstrdup (entry);
+ char *tmpent = strdup (entry);
char *value = tmpent;
char *var = strsep (&value, "=");
char *match;
@@ -220,19 +220,19 @@ int env_update (int argc, char **argv)
}
STRLIST_FOREACH (envs, env, j) {
- char *tmpenv = rc_xstrdup (env);
+ char *tmpenv = strdup (env);
char *tmpvalue = tmpenv;
char *tmpentry = strsep (&tmpvalue, "=");
if (strcmp (tmpentry, var) == 0) {
if (colon || space) {
int len = strlen (envs[j - 1]) + strlen (entry) + 1;
- envs[j - 1] = rc_xrealloc (envs[j - 1], len);
+ envs[j - 1] = xrealloc (envs[j - 1], len);
snprintf (envs[j - 1] + strlen (envs[j - 1]), len,
"%s%s", colon ? ":" : " ", value);
} else {
free (envs[j - 1]);
- envs[j - 1] = rc_xstrdup (entry);
+ envs[j - 1] = strdup (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 = rc_xstrdup (env);
+ char *tmpent = strdup (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 = rc_xstrdup (env);
+ char *tmpent = strdup (env);
char *value = tmpent;
char *var = strsep (&value, "=");
if (strcmp (var, "LDPATH") != 0) {
@@ -303,7 +303,7 @@ int env_update (int argc, char **argv)
if (ldconfig) {
/* Update ld.so.conf only if different */
- if (rc_exists (LDSOCONF)) {
+ if (exists (LDSOCONF)) {
char **lines = rc_config_list (LDSOCONF);
char *line;
ld = false;