diff options
author | Max Kellermann <max@duempel.org> | 2008-11-04 17:10:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-04 17:10:17 +0100 |
commit | 59c20e5afe8449204298c7d801b93636be237b4d (patch) | |
tree | 0d06d97c98d3f3a789aa3a6b9ed1ab6a8a9a1d7b /src/decoder | |
parent | 66eb3e90c36b25123e93c92d689cda2f0b82eb0a (diff) | |
download | mpd-59c20e5afe8449204298c7d801b93636be237b4d.tar.gz mpd-59c20e5afe8449204298c7d801b93636be237b4d.tar.xz mpd-59c20e5afe8449204298c7d801b93636be237b4d.zip |
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.
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/wavpack_plugin.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |