]> git.ipfire.org Git - thirdparty/kmod.git/commit
shared: tweak addu64_overflow() #if/else chain
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 30 Sep 2024 19:52:18 +0000 (20:52 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 15 Oct 2024 17:35:38 +0000 (12:35 -0500)
commit8fa87bf4aa4e0f38426fb233e3dc5b22f8b3bb1d
tree5058eb7987e697776c0e5b89e8fa527e1cecf05c
parente79bba6b4af86216072b56382198da645a0906f4
shared: tweak addu64_overflow() #if/else chain

Group the checks as applicable - require the long variant when
sizeof(long) == 8, or the long long one as sizeof(long long) == 8.

Ultimately, fold fallback in the #else path, since it's dead code atm
and seemingly confuses tools such as Coverity.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/169
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
shared/util.h