From 08075fa95d95e656b1d3fab1c5851318dfa17f9b Mon Sep 17 00:00:00 2001 From: Simo Piiroinen Date: Tue, 28 Aug 2018 13:05:19 +0300 Subject: [PATCH] [worker] Make internal module state data static Global data is problematic in general and these values have accessor functions anyway and thus there is no reason for extern visibility. Signed-off-by: Simo Piiroinen --- src/usb_moded-worker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usb_moded-worker.c b/src/usb_moded-worker.c index 45f1edc..db90fb4 100644 --- a/src/usb_moded-worker.c +++ b/src/usb_moded-worker.c @@ -253,7 +253,7 @@ static bool worker_switch_to_charging(void) * ------------------------------------------------------------------------- */ /** The module name for the specific mode */ -char *worker_kernel_module = NULL; +static char *worker_kernel_module = NULL; /** get the supposedly loaded module * @@ -311,7 +311,7 @@ void worker_clear_kernel_module(void) * ------------------------------------------------------------------------- */ /** Contains the mode data */ -struct mode_list_elem *worker_mode_data = NULL; +static struct mode_list_elem *worker_mode_data = NULL; /** get the usb mode data * @@ -343,9 +343,9 @@ void worker_set_usb_mode_data(struct mode_list_elem *data) * * For example internal_mode=MODE_ASK gets * mapped to hardware_mode=MODE_CHARGING */ -gchar *worker_requested_mode = NULL; +static gchar *worker_requested_mode = NULL; -gchar *worker_activated_mode = NULL; +static gchar *worker_activated_mode = NULL; static const char * worker_get_activated_mode_locked(void)