]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
tools/modprobe: initialize msec variables as needed
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 29 May 2025 14:31:36 +0000 (15:31 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 11 Jun 2025 12:54:40 +0000 (07:54 -0500)
Remove the initialization for interval_msec and tend_msec. They are set
on the first iteration... Assuming the user has set non-zero wait time.

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

index c501fb522952f5d639d3d05d1716a0b13f6da3bc..e60bc1bb4be3c0f3786bc9926588c623dabede4d 100644 (file)
@@ -315,7 +315,7 @@ end:
 static int rmmod_do_remove_module(struct kmod_module *mod)
 {
        const char *modname = kmod_module_get_name(mod);
-       unsigned long long interval_msec = 0, t0_msec = 0, tend_msec = 0;
+       unsigned long long interval_msec, t0_msec = 0, tend_msec;
        int flags = 0, err;
 
        SHOW("rmmod %s\n", modname);