Define status item list in afh_common.c.
authorAndre Noll <maan@systemlinux.org>
Thu, 5 Apr 2012 23:18:23 +0000 (01:18 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 5 Apr 2012 23:25:18 +0000 (01:25 +0200)
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
afh_common.c
command.c

diff --git a/afh.c b/afh.c
index bffe63216e71627dde4b4b49b53c436388500444..bc868106c0c23f2dc6fedcbe1a025a4b409d7bcb 100644 (file)
--- 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;
index 0d54eea132d8b91973e01971ab945411865ca2bc..9f1d1881e2e88043eeb7bafce6477676e8fc2076 100644 (file)
@@ -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.
  *
index 4a464ebf88c56ab4ed0257e39ae5767709819811..f520e3ea0ac7ff3d210d0d9c30b0a510302dba46 100644 (file)
--- 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)
 {
 }