ash: use mempcpy() where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
fd5e66eb8e
commit
da2244fe48
@ -2315,10 +2315,10 @@ setvar(const char *name, const char *val, int flags)
|
||||
|
||||
INT_OFF;
|
||||
nameeq = ckmalloc(namelen + vallen + 2);
|
||||
p = memcpy(nameeq, name, namelen) + namelen;
|
||||
p = mempcpy(nameeq, name, namelen);
|
||||
if (val) {
|
||||
*p++ = '=';
|
||||
p = memcpy(p, val, vallen) + vallen;
|
||||
p = mempcpy(p, val, vallen);
|
||||
}
|
||||
*p = '\0';
|
||||
setvareq(nameeq, flags | VNOSAVE);
|
||||
|
Loading…
Reference in New Issue
Block a user