]> git.ipfire.org Git - thirdparty/kmod.git/commit
tools/insmod: use single control variable
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:02 +0000 (13:37 -0500)
commitcd35ece58e23f2f5f6cb0b032d62cfcda9e94979
tree291df54a600207623fad6807ff86d3bbd1d7b772
parentcdbe3c68b1f6f9824fa56895f281e4a49d9d61e9
tools/insmod: use single control variable

Currently we're returning success, if any of the pre libkmod checks
fail. That's because err is our local variable, while r is the (exit)
resutlt. In practise we don't need the distinction, so just drop the
former.

Reported by clang.

Fixes: ca8f04e8 ("tools/insmod: add syslog and verbose options")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/180
[ add blank lines, remove extra braces ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
tools/insmod.c