aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 045d659ed..8656c0219 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12001,9 +12001,8 @@ setvar(const char *name, const char *val, int flags)
}
INTOFF;
p = mempcpy(nameeq = ckmalloc(namelen + vallen + 2), name, namelen);
- *p++ = '\0';
+ *p++ = '=';
if (vallen) {
- p[-1] = '=';
p = mempcpy(p, val, vallen);
}
*p = '\0';