Skip to content

Commit

Permalink
tools/insmod: 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: ca8f04e ("tools/insmod: add syslog and verbose options")
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 cdb6c2d commit 76db542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/insmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static int do_insmod(int argc, char *argv[])
char *opts = NULL;
size_t optslen = 0;
int verbose = LOG_ERR;
int use_syslog;
int use_syslog = 0;
int i, err = 0, r = 0;
const char *null_config = NULL;
unsigned int flags = 0;
Expand Down

0 comments on commit 76db542

Please sign in to comment.