summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-xml-output.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-10-04 23:14:08 +0300
committerAmar Tumballi <amarts@gmail.com>2019-11-26 06:59:31 +0000
commitb7411e36514f2e564b3808679732ad8a5c1d9efd (patch)
tree18326c0f8e00da6108f72feef8c7d407c2a2305c /cli/src/cli-xml-output.c
parenta8d54730bba5050ad53cfa46477e698d565e05b1 (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-xml-output.c')
-rw-r--r--cli/src/cli-xml-output.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index d7b998197ea..5f33aa9e0a3 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -3580,20 +3580,21 @@ cli_xml_output_vol_gsync_status(dict_t *dict, xmlTextWriterPtr writer)
char *volume_next = NULL;
char *slave = NULL;
char *slave_next = NULL;
- char *title_values[] = {"master_node", "", "master_brick", "slave_user",
- "slave", "slave_node", "status", "crawl_status",
- /* last_synced */
- "", "entry", "data", "meta", "failures",
- /* checkpoint_time */
- "", "checkpoint_completed",
- /* checkpoint_completion_time */
- "", "master_node_uuid",
- /* last_synced_utc */
- "last_synced",
- /* checkpoint_time_utc */
- "checkpoint_time",
- /* checkpoint_completion_time_utc */
- "checkpoint_completion_time"};
+ static const char *title_values[] = {
+ "master_node", "", "master_brick", "slave_user", "slave", "slave_node",
+ "status", "crawl_status",
+ /* last_synced */
+ "", "entry", "data", "meta", "failures",
+ /* checkpoint_time */
+ "", "checkpoint_completed",
+ /* checkpoint_completion_time */
+ "", "master_node_uuid",
+ /* last_synced_utc */
+ "last_synced",
+ /* checkpoint_time_utc */
+ "checkpoint_time",
+ /* checkpoint_completion_time_utc */
+ "checkpoint_completion_time"};
GF_ASSERT(dict);