From 8ae390f65142ed38a0b5e2474fc6a21866092e84 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2008 09:38:11 +0200 Subject: tag: renamed MpdTag and MpdTagItem to struct mpd_tag, struct tag_item Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures. --- src/inputPlugins/wavpack_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/inputPlugins/wavpack_plugin.c') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index c7e024a41..a97242239 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -270,10 +270,10 @@ static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc) /* * Reads metainfo from the specified file. */ -static MpdTag *wavpack_tagdup(char *fname) +static struct mpd_tag *wavpack_tagdup(char *fname) { WavpackContext *wpc; - MpdTag *tag; + struct mpd_tag *tag; char error[ERRORLEN]; char *s; int ssize; -- cgit v1.2.3 From 95451b5821da1383f476cd8d6c6c8d12e683b777 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2008 09:38:21 +0200 Subject: tag: renamed functions, no CamelCase --- src/inputPlugins/wavpack_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inputPlugins/wavpack_plugin.c') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index a97242239..c8b4ac339 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -285,9 +285,9 @@ static struct mpd_tag *wavpack_tagdup(char *fname) return NULL; } - tag = newMpdTag(); + tag = tag_new(); if (tag == NULL) { - ERROR("failed to newMpdTag()\n"); + ERROR("failed to tag_new()\n"); return NULL; } @@ -314,7 +314,7 @@ static struct mpd_tag *wavpack_tagdup(char *fname) } WavpackGetTagItem(wpc, tagtypes[i].name, s, j); - addItemToMpdTag(tag, tagtypes[i].type, s); + tag_add_item(tag, tagtypes[i].type, s); } } -- cgit v1.2.3 From 3787544e1dce9470629780aead44c97714b3ea35 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2008 09:38:25 +0200 Subject: wavpack: tag_new() cannot fail Since tag_new() uses xmalloc(), it cannot fail - if we're really out of memory, the process will abort. --- src/inputPlugins/wavpack_plugin.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/inputPlugins/wavpack_plugin.c') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index c8b4ac339..77339dabd 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -286,11 +286,6 @@ static struct mpd_tag *wavpack_tagdup(char *fname) } tag = tag_new(); - if (tag == NULL) { - ERROR("failed to tag_new()\n"); - return NULL; - } - tag->time = (float)WavpackGetNumSamples(wpc) / WavpackGetSampleRate(wpc); -- cgit v1.2.3