From ae76ca481b4000bdd474597665a2af1ecf3ec6d7 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Thu, 4 Jul 2024 15:06:59 -0400 Subject: tweak strlcat --- src/strlcat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/strlcat.h b/src/strlcat.h index 1af6bb1..6317855 100644 --- a/src/strlcat.h +++ b/src/strlcat.h @@ -11,17 +11,17 @@ * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. */ -size_t strlcat(char *dst, const char *src, size_t siz) { +size_t strlcat(char *dst, const char *src, size_t dstsize) { char *d = dst; const char *s = src; - size_t n = siz; + size_t n = dstsize; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; - n = siz - dlen; + n = dstsize - dlen; if (n == 0) return (dlen + strlen(s)); while (*s != '\0') { -- cgit v1.2.3