]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
modprobe: reduce visibility of use_syslog
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 18 Feb 2025 21:25:05 +0000 (22:25 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 18 Feb 2025 21:42:17 +0000 (15:42 -0600)
The use_syslog variable is only used within main function, so reduce
its visibility.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/282
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
tools/modprobe.c

index 79c9fe1d18f900080e80cb8a3a8b95524bd74e73..b1e4ae95ee399b38fba4df8b3947b138f892aca9 100644 (file)
@@ -28,7 +28,6 @@
 #include "kmod.h"
 
 static int log_priority = LOG_CRIT;
-static bool use_syslog = false;
 #define LOG(...) log_printf(log_priority, __VA_ARGS__)
 
 #define DEFAULT_VERBOSE LOG_WARNING
@@ -765,6 +764,7 @@ static int do_modprobe(int argc, char **orig_argv)
        int do_show_exports = 0;
        int err;
        struct stat stat_buf;
+       bool use_syslog = false;
 
        argv = prepend_options_from_env(&argc, orig_argv);
        if (argv == NULL) {