]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/adds.[ch]: Add addsl() and addsl3()
authorAlejandro Colomar <alx@kernel.org>
Wed, 20 Dec 2023 20:43:03 +0000 (21:43 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 5 Jan 2024 21:45:08 +0000 (15:45 -0600)
commit89e5a3296662cdaf930e6ea372afbab812384f10
treeb1bdda50509dc306739127abc33683f6c3449b11
parent1a383194ff83ad563a060d798e2cce0a25f317b9
lib/adds.[ch]: Add addsl() and addsl3()

These functions add 2 or 3 longs, saturating to LONG_{MIN,MAX} instead
of overflowing.

Cc: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/adds.c [new file with mode: 0644]
lib/adds.h [new file with mode: 0644]