From: Denys Vlasenko Date: Fri, 21 Jul 2017 16:51:29 +0000 (+0200) Subject: ash: use mempcpy() where appropriate X-Git-Tag: 1_28_0~337 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=da2244fe48b7f1223427a4c1e91d86e398bbceb4;p=oweals%2Fbusybox.git ash: use mempcpy() where appropriate Signed-off-by: Denys Vlasenko --- diff --git a/shell/ash.c b/shell/ash.c index a461bb7df..c8b2adf4e 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -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);