From c7a9a1fb6c5a60c453372502af3d3477ac91dd2b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 13 May 2024 02:10:08 +0200 Subject: [PATCH] cleanup: use static vars Drop global visibility. --- daemons/lvmpolld/lvmpolld-core.c | 2 +- libdm/dm-tools/dmsetup.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemons/lvmpolld/lvmpolld-core.c b/daemons/lvmpolld/lvmpolld-core.c index b654c8c9d..25fb35b92 100644 --- a/daemons/lvmpolld/lvmpolld-core.c +++ b/daemons/lvmpolld/lvmpolld-core.c @@ -781,7 +781,7 @@ struct log_line_baton { const char *prefix; }; -daemon_handle _lvmpolld = { .error = 0 }; +static daemon_handle _lvmpolld = { .error = 0 }; static daemon_handle _lvmpolld_open(const char *socket) { diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c index 8713dc486..0c6d88b6d 100644 --- a/libdm/dm-tools/dmsetup.c +++ b/libdm/dm-tools/dmsetup.c @@ -273,7 +273,7 @@ static uint64_t _count = 1; /* count of repeating reports */ static struct dm_timestamp *_initial_timestamp = NULL; static uint64_t _disp_factor = 512; /* display sizes in sectors */ static char _disp_units = 's'; -const char *_program_id = DM_STATS_PROGRAM_ID; /* program_id used for reports. */ +static const char *_program_id = DM_STATS_PROGRAM_ID; /* program_id used for reports. */ static uint64_t _statstype = 0; /* stats objects to report */ static int _concise_output_produced = 0; /* Was any concise output already printed? */ static int _added_target = 0; /* Count added target (no target -> no event) */ @@ -281,7 +281,7 @@ struct command; static const struct command *_selection_cmd = NULL; /* Command to run against each device select with -S */ /* string names for stats object types */ -const char * const _stats_types[] = { +static const char * const _stats_types[] = { "all", "area", "region",