From 72dfead09b39d78cb99af85bd9247a9aa4d2b475 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 29 May 2025 15:31:36 +0100 Subject: [PATCH] tools/modprobe: initialize msec variables as needed 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 Link: https://github.com/kmod-project/kmod/pull/361 Signed-off-by: Lucas De Marchi --- tools/modprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/modprobe.c b/tools/modprobe.c index c501fb52..e60bc1bb 100644 --- a/tools/modprobe.c +++ b/tools/modprobe.c @@ -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); -- 2.47.3