]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: used unsigned type for INDEX_CHILDMAX and co
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 9 Oct 2024 15:26:25 +0000 (16:26 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 15 Oct 2024 18:37:11 +0000 (13:37 -0500)
commit6b2653a35ea69e9f3e6804d0e6321ab211d523c6
tree0aefd3ae0024905059ebb38fa6839c3f4724a407
parent70afc749bc7ad9a89fc2427eba5c3f26f1a4e0e9
libkmod: used unsigned type for INDEX_CHILDMAX and co

Currently the define is an signed int of 128, which we store in a char
triggering a clang warning. This is expected since the sign of char is
platform specific.

Convert the macro to unsigned and the respective variables to unsigned
char, alongside the documentation comment.

With that done, adjust the first/last checks so we don't get
tautological-compare warnings from clang.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/180
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-index.c