From 24fe68dcc1b4147dd2550306749cfa6b1582fb81 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 18 Sep 2024 16:49:08 +0100 Subject: [PATCH] tools/rmmod: make opt variables non-global They're used locally within one function so declare them there. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/138 Signed-off-by: Lucas De Marchi --- tools/rmmod.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/rmmod.c b/tools/rmmod.c index 6b924ab1..b56416c2 100644 --- a/tools/rmmod.c +++ b/tools/rmmod.c @@ -20,10 +20,6 @@ #include "kmod.h" -#define DEFAULT_VERBOSE LOG_ERR -static int verbose = DEFAULT_VERBOSE; -static int use_syslog; - static const char cmdopts_s[] = "fsvVh"; static const struct option cmdopts[] = { // clang-format off @@ -97,6 +93,8 @@ static int do_rmmod(int argc, char *argv[]) { struct kmod_ctx *ctx; const char *null_config = NULL; + int verbose = LOG_ERR; + int use_syslog; int flags = 0; int i, err, r = 0;