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-rpc-ops.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-rpc-ops.c')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index f3228448cb3..5330ac340c6 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -5079,22 +5079,22 @@ gf_cli_gsync_status_output(dict_t *dict, gf_boolean_t is_detail) char errmsg[1024] = ""; char *master = NULL; char *slave = NULL; - char *title_values[] = {"MASTER NODE", - "MASTER VOL", - "MASTER BRICK", - "SLAVE USER", - "SLAVE", - "SLAVE NODE", - "STATUS", - "CRAWL STATUS", - "LAST_SYNCED", - "ENTRY", - "DATA", - "META", - "FAILURES", - "CHECKPOINT TIME", - "CHECKPOINT COMPLETED", - "CHECKPOINT COMPLETION TIME"}; + static char *title_values[] = {"MASTER NODE", + "MASTER VOL", + "MASTER BRICK", + "SLAVE USER", + "SLAVE", + "SLAVE NODE", + "STATUS", + "CRAWL STATUS", + "LAST_SYNCED", + "ENTRY", + "DATA", + "META", + "FAILURES", + "CHECKPOINT TIME", + "CHECKPOINT COMPLETED", + "CHECKPOINT COMPLETION TIME"}; gf_gsync_status_t **sts_vals = NULL; /* Checks if any session is active or not */ |