From da2244fe48b7f1223427a4c1e91d86e398bbceb4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 21 Jul 2017 18:51:29 +0200 Subject: [PATCH] ash: use mempcpy() where appropriate Signed-off-by: Denys Vlasenko --- shell/ash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.25.1