Skip to content

Commit

Permalink
tools/rmmod: make opt variables non-global
Browse files Browse the repository at this point in the history
They're used locally within one function so declare them there.

Signed-off-by: Emil Velikov <[email protected]>
Link: #138
Signed-off-by: Lucas De Marchi <[email protected]>
  • Loading branch information
evelikov authored and lucasdemarchi committed Sep 21, 2024
1 parent 4cc728f commit 24fe68d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/rmmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 24fe68d

Please sign in to comment.