diff options
author | Max Kellermann <max@duempel.org> | 2009-11-19 19:49:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-19 19:49:44 +0100 |
commit | 21fdf47b563ab7684dc7022aadf5d63bb011ea52 (patch) | |
tree | 1ff0be3e915db1cffbbe111d1c6d6daa0620d9ca /src | |
parent | d1aee3ae74716a9f87b6fcc2ae6583c0cb40daec (diff) | |
download | mpd-21fdf47b563ab7684dc7022aadf5d63bb011ea52.tar.gz mpd-21fdf47b563ab7684dc7022aadf5d63bb011ea52.tar.xz mpd-21fdf47b563ab7684dc7022aadf5d63bb011ea52.zip |
decoder/flac: fixed compiler warning
Removed the "vtrack" local variable (which triggered a gcc warning
because it was after the newly introduced NULL check), and run
strtol() on the original parameter.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/_flac_common.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c index 9338dc6ae..7c8fe9875 100644 --- a/src/decoder/_flac_common.c +++ b/src/decoder/_flac_common.c @@ -419,9 +419,7 @@ flac_vtrack_tnum(const char* fname) return 0; // copy ascii tracknumber to int - char vtrack[4]; - g_strlcpy(vtrack, ++ptr, 4); - return (unsigned int)strtol(vtrack, NULL, 10); + return (unsigned int)strtol(++ptr, NULL, 10); } #endif /* FLAC_API_VERSION_CURRENT >= 7 */ |