diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-05 20:15:17 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-05 20:15:17 +0200 |
commit | 6db4784d27be020d892f92db0cba70452b1c128e (patch) | |
tree | f71502294df15bbbf211453c07b6763fddad63ad /shell/ash.c | |
parent | 2cc709139ebd543a1bb126d3ce77683961a89d75 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 35d5cde58..eca4ab98c 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"); |