From 4f081e7f3ee01e726c7684f5b18dde86100db759 Mon Sep 17 00:00:00 2001 From: Quinn Date: Sat, 13 Sep 2025 21:09:56 +0200 Subject: [PATCH] remove usage of mempcpy; this is apart of GNU C --- src/util/conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/conf.c b/src/util/conf.c index 5458c07..d0d028a 100644 --- a/src/util/conf.c +++ b/src/util/conf.c @@ -138,8 +138,8 @@ static char *conf_getpat_concat(const char *restrict s1, const char *restrict s2 buf = ptr; // store the head pointer into buf // copy data to the buffer - ptr = mempcpy(ptr, s1, s1len); // copy s1 data to the buffer - if (s2len) ptr = mempcpy(ptr, s2, s2len); // copy s2 data to the buffer (excluding null-terminator) + ptr = memcpy(ptr, s1, s1len) + s1len; // copy s1 data to the buffer + if (s2len) ptr = memcpy(ptr, s2, s2len) + s2len; // copy s2 data to the buffer (excluding null-terminator) (void)strcpy(ptr, s3); // copy s3 as a string, thus including null-terminator // return the buffer