From 92957c23f07558fa9d73e183a9739eed240bf7b4 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 7 Jun 2020 21:06:28 +0000 Subject: Whoops, warnings are actually worse; revert previous commit git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3853 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 ee997ab4..8829617d 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)-1), *((A)+sizeof(A)-1) = '\0') + (strncpy((A), (B), sizeof(A)), *((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)-1), *((A)+sizeof(A)-1) = '\0') + (strncpy(A+strlen(A), B, sizeof(A)-strlen(A)), *((A)+sizeof(A)-1) = '\0') #define STRSEQ(A, B) \ (strneq((A), (B), sizeof(A))) -- cgit 1.4.1