diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-10-04 23:14:08 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-11-26 06:59:31 +0000 |
commit | b7411e36514f2e564b3808679732ad8a5c1d9efd (patch) | |
tree | 18326c0f8e00da6108f72feef8c7d407c2a2305c /cli/src/cli-cmd-misc.c | |
parent | a8d54730bba5050ad53cfa46477e698d565e05b1 (diff) |
cli-*: make some structs static to reduce space consumed.
There's a small difference when structs are defined static.
Whenever possible, define them as such.
Specifically, before:
text data bss dec hex filename
678 216 0 894 37e ./cli/src/cli-cmd-misc.o
150024 1264 16 151304 24f08 ./cli/src/cli-rpc-ops.o
71980 64 0 72044 1196c ./cli/src/cli-cmd-parser.o
66189 4 16 66209 102a1 ./cli/src/cli-xml-output.o
After:
text data bss dec hex filename
670 216 0 886 376 ./cli/src/cli-cmd-misc.o
149848 1392 16 151256 24ed8 ./cli/src/cli-rpc-ops.o
70346 1320 0 71666 117f2 ./cli/src/cli-cmd-parser.o
66157 4 16 66177 10281 ./cli/src/cli-xml-output.o
Change-Id: I206bd895290595d79fac7b26eee66f4279b50f92
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-misc.c')
-rw-r--r-- | cli/src/cli-cmd-misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-misc.c b/cli/src/cli-cmd-misc.c index 120d4ab69b5..658677bbca3 100644 --- a/cli/src/cli-cmd-misc.c +++ b/cli/src/cli-cmd-misc.c @@ -57,7 +57,7 @@ int cli_cmd_display_help(struct cli_state *state, struct cli_cmd_word *in_word, const char **words, int wordcount) { - struct cli_cmd *cmd[] = { + static struct cli_cmd *cmd[] = { cli_misc_cmds, cli_probe_cmds, volume_cmds, bitrot_cmds, quota_cmds, snapshot_cmds, global_cmds, NULL}; struct cli_cmd *cmd_ind = NULL; |