From 94745bf46ae3ccfa0622e338a6c0a8e9b4e64041 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 7 Jun 2020 20:41:58 +0000 Subject: silence compiler warnings git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3850 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/util/nstring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/util/nstring.h b/lib/util/nstring.h index 8829617d..ee997ab4 100644 --- a/lib/util/nstring.h +++ b/lib/util/nstring.h @@ -22,11 +22,11 @@ extern "C" { array. */ #define STRSCPY(A,B) \ - (strncpy((A), (B), sizeof(A)), *((A)+sizeof(A)-1) = '\0') + (strncpy((A), (B), sizeof(A)-1), *((A)+sizeof(A)-1) = '\0') #define STRSCMP(A,B) \ (strncmp((A), (B), sizeof(A))) #define STRSCAT(A,B) \ - (strncpy(A+strlen(A), B, sizeof(A)-strlen(A)), *((A)+sizeof(A)-1) = '\0') + (strncpy(A+strlen(A), B, sizeof(A)-strlen(A)-1), *((A)+sizeof(A)-1) = '\0') #define STRSEQ(A, B) \ (strneq((A), (B), sizeof(A))) -- cgit 1.4.1