Skip to content

Commit

Permalink
tools/rmmod: initialize use_syslog
Browse files Browse the repository at this point in the history
Initialize the variable, otherwise we'll get (random) stack value if the
user hasn't provided --syslog. Reported by scan-build.

Fixes: 24fe68d ("tools/rmmod: make opt variables non-global")
Signed-off-by: Emil Velikov <[email protected]>
Link: #172
Signed-off-by: Lucas De Marchi <[email protected]>
  • Loading branch information
evelikov authored and lucasdemarchi committed Oct 9, 2024
1 parent 76db542 commit c566ae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/rmmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ 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 use_syslog = 0;
int flags = 0;
int i, err, r = 0;

Expand Down

0 comments on commit c566ae7

Please sign in to comment.