From 59c20e5afe8449204298c7d801b93636be237b4d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 4 Nov 2008 17:10:17 +0100 Subject: wavpack: removed NULL element from tagtypes The number of tag types is known at compile time. Use the GLib macro G_N_ELEMENTS instead of having a NULL element at the end. --- src/decoder/wavpack_plugin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c index b39611f35..977ab973d 100644 --- a/src/decoder/wavpack_plugin.c +++ b/src/decoder/wavpack_plugin.c @@ -44,7 +44,6 @@ static struct { { "performer", TAG_ITEM_PERFORMER }, { "comment", TAG_ITEM_COMMENT }, { "disc", TAG_ITEM_DISC }, - { NULL, 0 } }; /* @@ -283,7 +282,7 @@ static struct tag *wavpack_tagdup(const char *fname) char error[ERRORLEN]; char *s; int ssize; - int i, j; + int j; wpc = WavpackOpenFileInput(fname, error, OPEN_TAGS, 0); if (wpc == NULL) { @@ -299,7 +298,7 @@ static struct tag *wavpack_tagdup(const char *fname) ssize = 0; s = NULL; - for (i = 0; tagtypes[i].name != NULL; ++i) { + for (unsigned i = 0; i < G_N_ELEMENTS(tagtypes); ++i) { j = WavpackGetTagItem(wpc, tagtypes[i].name, NULL, 0); if (j > 0) { ++j; -- cgit v1.2.3