]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/string/zustr2stp.[ch]: Remove zustr2stp(); keep ZUSTR2STP()
authorAlejandro Colomar <alx@kernel.org>
Sun, 3 Dec 2023 20:43:07 +0000 (21:43 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 11 Mar 2024 00:55:39 +0000 (19:55 -0500)
commitffb3992467a76575da3000e3e72c929fe7ad1038
tree1ea6e25e2fb15015222b3acedbe215846f49af65
parentba43b49a5287e2e1c9a18da4da8d95216f38feee
lib/string/zustr2stp.[ch]: Remove zustr2stp(); keep ZUSTR2STP()

The function should never be used; it's always used via its wrapper
macro.  To simplify, and reduce chances of confusion: remove the
function, and implement the macro directly in terms of
stpcpy(mempcpy(strnlen())).

Update the documentation, and improve the example, which was rather
confusing.

Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/string/zustr2stp.c
lib/string/zustr2stp.h