]> git.ipfire.org Git - thirdparty/shadow.git/commit
Add stpecpy()
authorAlejandro Colomar <alx@kernel.org>
Fri, 10 Feb 2023 21:34:37 +0000 (22:34 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Thu, 16 Feb 2023 10:29:33 +0000 (11:29 +0100)
commit709e6b4497c7be9c5301e3c7ef8fe9e6f0f5db8d
treeecb82fba4e9f4d57a201e8ed4f279d8b0aa184bf
parente0e9e57a72e9f1bf2acb3156cc982d59b9ee4248
Add stpecpy()

strncat(3), strlcpy(3), and many other functions are often misused for
catenating strings, when they should never be used for that.  strlcat(3)
is good.  However, there's no equivalent to strlcat(3) similar to
snprintf(3).  Let's add stpecpy(), which is similar to strlcat(3), but
it is also the only function compatible with stpeprintf(), which makes
it more useful than strlcat(3).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/stpecpy.h [new file with mode: 0644]
libmisc/Makefile.am
libmisc/stpecpy.c [new file with mode: 0644]