]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/: Treat strpbrk(3)'s return value as a boolean
authorAlejandro Colomar <alx@kernel.org>
Wed, 1 Jan 2025 00:04:38 +0000 (01:04 +0100)
committerSerge Hallyn <serge@hallyn.com>
Tue, 27 May 2025 01:04:27 +0000 (20:04 -0500)
commit38e295153241ee55dddd5b7ab570e16ef2f60f85
tree40fc3828621ebaa1d2ff654b1d29d65f6e623062
parentd1aec10e2c26a3dbaa6055ab8c1d15292f59e14b
lib/: Treat strpbrk(3)'s return value as a boolean

with the meaning "a character was found".

strpbrk(3) is just like strchr(3), but searches for multiple characters.
Both functions have a boolean-like return value, which evaluates to true
if a character was found.

A better name for strpbrk(3) would have been strchrs().

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/fields.c
lib/setupenv.c