From 92030dd4c221e8043521ae4dc9d32d50e6ff44c4 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 12 Feb 2023 13:22:57 -0800 Subject: parse.c: remove unused function xstrlcpy() parse.c:74:1: warning: unused function 'xstrlcpy' [-Wunused-function] xstrlcpy(char *dst, const char *src, size_t dstsize) ^ Signed-off-by: Alan Coopersmith --- src/parse.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/parse.c b/src/parse.c index 2bb3f0e..ab65f50 100644 --- a/src/parse.c +++ b/src/parse.c @@ -66,25 +66,6 @@ xstrlcat(char *dst, const char *src, size_t dstsize) #endif } -/** - * like strlcpy() but returns true on success and false if the string got - * truncated. - */ -static inline Bool -xstrlcpy(char *dst, const char *src, size_t dstsize) -{ -#if defined(HAS_STRLCAT) || defined(HAVE_STRLCAT) - return strlcpy(dst, src, dstsize) < dstsize; -#else - if (strlen(src) < dstsize) { - strcpy(dst, src); - return True; - } else { - return False; - } -#endif -} - LFUNC(ParsePixels, int, (xpmData *data, unsigned int width, unsigned int height, unsigned int ncolors, unsigned int cpp, XpmColor *colorTable, -- cgit v1.2.1