From 4c1b96c30721f78d9251a8074d4d516c37e755b9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 1 Nov 2008 14:55:23 +0100 Subject: decoder: make the suffixes and mime_types arrays really const The strings were constant, but the pointers weren't. C syntax is somewhat tricky.. --- src/decoder/flac_plugin.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/decoder/flac_plugin.c') diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c index 8b49ec3e5..05517db27 100644 --- a/src/decoder/flac_plugin.c +++ b/src/decoder/flac_plugin.c @@ -429,11 +429,13 @@ oggflac_try_decode(struct input_stream *inStream) ogg_stream_type_detect(inStream) == FLAC; } -static const char *oggflac_suffixes[] = { "ogg", "oga", NULL }; -static const char *oggflac_mime_types[] = { "audio/x-flac+ogg", - "application/ogg", - "application/x-ogg", - NULL }; +static const char *const oggflac_suffixes[] = { "ogg", "oga", NULL }; +static const char *const oggflac_mime_types[] = { + "audio/x-flac+ogg", + "application/ogg", + "application/x-ogg", + NULL +}; const struct decoder_plugin oggflacPlugin = { .name = "oggflac", @@ -447,10 +449,10 @@ const struct decoder_plugin oggflacPlugin = { #endif /* FLAC_API_VERSION_CURRENT >= 7 */ -static const char *flacSuffixes[] = { "flac", NULL }; -static const char *flac_mime_types[] = { "audio/x-flac", - "application/x-flac", - NULL }; +static const char *const flacSuffixes[] = { "flac", NULL }; +static const char *const flac_mime_types[] = { + "audio/x-flac", "application/x-flac", NULL +}; const struct decoder_plugin flacPlugin = { .name = "flac", -- cgit v1.2.3