From: Emil Velikov Date: Thu, 29 May 2025 14:31:36 +0000 (+0100) Subject: tools/modprobe: initialize msec variables as needed X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72dfead09b39d78cb99af85bd9247a9aa4d2b475;p=thirdparty%2Fkmod.git 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 --- 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);