summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMatt Kraai2001-11-12 16:57:27 +0000
committerMatt Kraai2001-11-12 16:57:27 +0000
commitc8227639db90c3147ef68f33c98e96b0ab6b01d6 (patch)
treeb704ef3f684a41c7705b5e36dac2127d23d129c4 /shell
parent357cfc739ed5f5c00ee46a43820a1d02367e3b38 (diff)
downloadbusybox-c8227639db90c3147ef68f33c98e96b0ab6b01d6.zip
busybox-c8227639db90c3147ef68f33c98e96b0ab6b01d6.tar.gz
Change strdup calls to xstrdup (patch from Steve Merrifield).
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c6
-rw-r--r--shell/lash.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f218a88..c1603d7 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12090,7 +12090,7 @@ initvar() {
vpp = hashvar(ip->text);
vp->next = *vpp;
*vpp = vp;
- vp->text = strdup(ip->text);
+ vp->text = xstrdup(ip->text);
vp->flags = ip->flags;
vp->func = ip->func;
}
@@ -12102,7 +12102,7 @@ initvar() {
vpp = hashvar("PS1=");
vps1.next = *vpp;
*vpp = &vps1;
- vps1.text = strdup(geteuid() ? "PS1=$ " : "PS1=# ");
+ vps1.text = xstrdup(geteuid() ? "PS1=$ " : "PS1=# ");
vps1.flags = VSTRFIXED|VTEXTFIXED;
}
}
@@ -12646,7 +12646,7 @@ findvar(struct var **vpp, const char *name)
/*
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
* This file contains code for the times builtin.
- * $Id: ash.c,v 1.35 2001/11/12 16:44:55 kraai Exp $
+ * $Id: ash.c,v 1.36 2001/11/12 16:57:26 kraai Exp $
*/
static int timescmd (int argc, char **argv)
{
diff --git a/shell/lash.c b/shell/lash.c
index 5b9d0a6..79fd433 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -820,7 +820,7 @@ static int expand_arguments(char *command)
/* We need a clean copy, so strsep can mess up the copy while
* we write stuff into the original (in a minute) */
- cmd = cmd_copy = strdup(command);
+ cmd = cmd_copy = xstrdup(command);
*command = '\0';
for (ix = 0, tmpcmd = cmd;
(tmpcmd = strsep_space(cmd, &ix)) != NULL; cmd += ix, ix=0) {