]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/atoi/strtou_noneg.[ch]: Add strtou[l]l_noneg()
authorAlejandro Colomar <alx@kernel.org>
Sun, 10 Dec 2023 23:51:05 +0000 (00:51 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 22 Jan 2024 23:17:15 +0000 (17:17 -0600)
commit4a2646f67649ad8f8c25159d4c2ff26565d2874a
tree3555c6c25325bc2a3c0bb81be42c68ac0def0083
parent4d835c7ea462a5a35ea1d9d06a3cf8a629880730
lib/atoi/strtou_noneg.[ch]: Add strtou[l]l_noneg()

These functions reject negative numbers, instead of silently converting
them into unsigned, which strtou[l]l(3) do.

Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/atoi/strtou_noneg.c [new file with mode: 0644]
lib/atoi/strtou_noneg.h [new file with mode: 0644]