]> git.ipfire.org Git - thirdparty/kmod.git/commit
tools/insmod: minor getopt tweaks
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 19 Oct 2024 17:11:17 +0000 (18:11 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 22 Oct 2024 15:37:11 +0000 (10:37 -0500)
commitb14c16ba373aabc92dbf04a20281bc9a3710861e
tree7f06d328df97140c78690a001209b87a654af0d4
parent557e79c360a304ab22c2a81daff440f4e052a1a0
tools/insmod: minor getopt tweaks

Pull the unistd.h for optind and adjust the loop to follow the
in-documentation example.

Namely, we don't need the unused idx and removing the seemingly
infinite loop helps static analysers better reason about the code flow.

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