From bcdb57b4ddca3862e5f96a8ffcc8d2219c554fca Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Sat, 1 Jul 2023 09:53:08 +1200 Subject: [PATCH] Add credit to OpenBSD for strlcat and strlcpy --- util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 5e18bcb..11732cc 100644 --- a/util.c +++ b/util.c @@ -21,6 +21,11 @@ lfail(lua_State *L, const char* mesg) return LFAIL_RET; } +/* + * String concatenation and copying functions + * from OpenBSD lib/libc/string/strlcat.c and + * lib/libc/string/strlcpy.c respectively + */ #ifndef BSD /* * Appends src to string dst of size dsize (unlike strncat, dsize is the @@ -86,7 +91,6 @@ strlcpy(char *dst, const char *src, size_t dsize) return(src - osrc - 1); /* count does not include NUL */ } #endif - /* * Prepends t to s. */