]> git.ipfire.org Git - thirdparty/kmod.git/commit
tools/rmmod: rework control flow
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)
commit70afc749bc7ad9a89fc2427eba5c3f26f1a4e0e9
treeb8b3b6d5661b3b66f1d0f77f4b40fece6cce871b
parentcd35ece58e23f2f5f6cb0b032d62cfcda9e94979
tools/rmmod: rework control flow

Currently the control flow we use is a bit tricky:

 - we use a goto within a loop, to avoid one function call
 - we increment r, assuming it cannot wrap around

In practise these are not bugs, although make the code more convoluted
than needed. While in here, scope the local err to where it's used.

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>
tools/rmmod.c