]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/: Simplify, using strpbrk(3)
authorAlejandro Colomar <alx@kernel.org>
Tue, 31 Dec 2024 22:37:39 +0000 (23:37 +0100)
committerSerge Hallyn <serge@hallyn.com>
Tue, 27 May 2025 01:04:27 +0000 (20:04 -0500)
commitd1aec10e2c26a3dbaa6055ab8c1d15292f59e14b
treeae68877186b1259bbb8ae2b15e7ddbf8f78102f9
parentd1cbf68f61b182af3f2209458756b60f62f304ad
src/: Simplify, using strpbrk(3)

Checking a boolean (actually, a boolean-like pointer) is more readable
than comparing against a length.

This removes the only uses of strcspn(3) in this project.

strpbrk(3) is a simpler call, even though it has a weird name.  It's
just like strchr(3) but searches for several characters.  I'd have named
it strchrs().

Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/useradd.c
src/usermod.c