From e654b9cba97b4a1f18f24b7e662e6403f4da03ea Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 28 Apr 2024 20:14:42 +0200 Subject: [PATCH] command: more arrays keep static --- tools/command.c | 8 ++++---- tools/lvmcmdline.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/command.c b/tools/command.c index d349ab44f..cd8f00ea5 100644 --- a/tools/command.c +++ b/tools/command.c @@ -84,13 +84,13 @@ static const struct cmd_name cmd_names[CMD_COUNT + 1] = { #ifdef MAN_PAGE_GENERATOR -struct command_name command_names[] = { +static struct command_name command_names[] = { #define xx(a, b, c...) { # a, b, c }, #include "commands.h" #undef xx { .name = NULL } }; -struct command commands[COMMAND_COUNT]; +static struct command commands[COMMAND_COUNT]; #else /* MAN_PAGE_GENERATOR */ @@ -130,11 +130,11 @@ const struct lv_type *get_lv_type(int lvt_enum) /* array of pointers into opt_names[] that is sorted alphabetically (by long opt name) */ -struct opt_name *opt_names_alpha[ARG_COUNT + 1]; +static struct opt_name *opt_names_alpha[ARG_COUNT + 1]; /* lvm_all is for recording options that are common for all lvm commands */ -struct command lvm_all; +static struct command lvm_all; /* saves OO_FOO lines (groups of optional options) to include in multiple defs */ diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index ce4d6817b..d240901f4 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -58,7 +58,7 @@ extern struct command_name command_names[]; * Table of commands (as defined in command-lines.in) */ struct command commands[COMMAND_COUNT]; -struct command *commands_idx[COMMAND_COUNT]; +static struct command *commands_idx[COMMAND_COUNT]; static struct cmdline_context _cmdline;