aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-29 15:51:31 +0200
committerMax Kellermann <max@duempel.org>2008-09-29 15:51:31 +0200
commite8e94382554320c078397a3c053be4fb2f31baeb (patch)
treede43d22d8844497060d842edb975caeafd245673
parent798eeeee633c77bb7ca1a36c161ffe151bacff76 (diff)
downloadmpd-e8e94382554320c078397a3c053be4fb2f31baeb.tar.gz
mpd-e8e94382554320c078397a3c053be4fb2f31baeb.tar.xz
mpd-e8e94382554320c078397a3c053be4fb2f31baeb.zip
removed union const_hack
The union const_hack is only used at one place in the shout plugin. Remove its global type declaration.
-rw-r--r--src/audioOutputs/audioOutput_shout_ogg.c6
-rw-r--r--src/mpd_types.h5
2 files changed, 4 insertions, 7 deletions
diff --git a/src/audioOutputs/audioOutput_shout_ogg.c b/src/audioOutputs/audioOutput_shout_ogg.c
index aa96c4032..d0303b3bb 100644
--- a/src/audioOutputs/audioOutput_shout_ogg.c
+++ b/src/audioOutputs/audioOutput_shout_ogg.c
@@ -40,8 +40,10 @@ struct ogg_vorbis_data {
static void add_tag(struct ogg_vorbis_data *od, const char *name, char *value)
{
if (value) {
- union const_hack u;
- u.in = name;
+ union {
+ const char *in;
+ char *out;
+ } u = { .in = name };
vorbis_comment_add_tag(&od->vc, u.out, value);
}
}
diff --git a/src/mpd_types.h b/src/mpd_types.h
index 0cc35b996..bc8c35119 100644
--- a/src/mpd_types.h
+++ b/src/mpd_types.h
@@ -65,9 +65,4 @@ typedef signed long int32_t;
#endif /* !HAVE_STDINT_H && !HAVE_INTTYPES_H */
-union const_hack {
- const char *in;
- char *out;
-};
-
#endif