From 350c399b0c81d70cb78fab58d9be1ca1a83cbaab Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 14 Apr 2018 22:52:44 +0200 Subject: Fix useless GCC8 warning, strncpy->memcpy for fixed string. --- env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env.c b/env.c index 1192e14a..f1fb2cdf 100644 --- a/env.c +++ b/env.c @@ -243,7 +243,7 @@ char *rfc822timestamp(void) #if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) setlocale (LC_TIME, ""); #endif - strncpy(strstr(buf, "XXXXX"), tzoffset(&now), 5); + memcpy(strstr(buf, "XXXXX"), tzoffset(&now), 5); #else /* * This is really just a portability fallback, as the -- cgit v1.2.3