From 54a1c08546d2f37186fb0bdd3b9b86bfcf0e90cd Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 6 Apr 2012 01:18:23 +0200 Subject: [PATCH] Define status item list in afh_common.c. The status_item_list array is needed for the audio format handler info struct (afhi), so all executables which contain afh_common.o need it. Currently, afh.c and command.c define their own instance for para_afh and para_server respectively. Moving the definition of the array to afc.c saves one instance. No big deal. --- afh.c | 3 --- afh_common.c | 4 ++++ command.c | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/afh.c b/afh.c index bffe6321..bc868106 100644 --- a/afh.c +++ b/afh.c @@ -18,9 +18,6 @@ #include "version.h" static struct afh_args_info conf; -/** The list of all status items */ -const char *status_item_list[] = {STATUS_ITEM_ARRAY}; - INIT_AFH_ERRLISTS; static int loglevel; diff --git a/afh_common.c b/afh_common.c index 0d54eea1..9f1d1881 100644 --- a/afh_common.c +++ b/afh_common.c @@ -33,6 +33,10 @@ void mp3_init(struct audio_format_handler *); #endif void wma_afh_init(struct audio_format_handler *); + +/** The list of all status items */ +const char *status_item_list[] = {STATUS_ITEM_ARRAY}; + /** * The list of supported audio formats. * diff --git a/command.c b/command.c index 4a464ebf..f520e3ea 100644 --- a/command.c +++ b/command.c @@ -43,8 +43,6 @@ extern struct misc_meta_data *mmd; extern struct sender senders[]; int send_afs_status(struct command_context *cc, int parser_friendly); -const char *status_item_list[] = {STATUS_ITEM_ARRAY}; - static void dummy(__a_unused int s) { } -- 2.39.5