summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-09-05 20:15:17 +0200
committerDenys Vlasenko2009-09-05 20:15:17 +0200
commit6db4784d27be020d892f92db0cba70452b1c128e (patch)
treef71502294df15bbbf211453c07b6763fddad63ad /shell/ash.c
parent2cc709139ebd543a1bb126d3ce77683961a89d75 (diff)
downloadbusybox-6db4784d27be020d892f92db0cba70452b1c128e.zip
busybox-6db4784d27be020d892f92db0cba70452b1c128e.tar.gz
hush: export PWD
function old new delta set_pwd_var - 36 +36 hush_main 941 951 +10 evalvar 1365 1363 -2 ash_main 1364 1362 -2 builtin_cd 75 72 -3 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/3 up/down: 46/-7) Total: 39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 35d5cde..eca4ab9 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12985,7 +12985,7 @@ init(void)
/* from var.c: */
{
char **envp;
- char ppid[sizeof(int)*3 + 1];
+ char ppid[sizeof(int)*3 + 2];
const char *p;
struct stat st1, st2;
@@ -12996,7 +12996,7 @@ init(void)
}
}
- snprintf(ppid, sizeof(ppid), "%u", (unsigned) getppid());
+ sprintf(ppid, "%u", (unsigned) getppid());
setvar("PPID", ppid, 0);
p = lookupvar("PWD");