aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-19 19:49:44 +0100
committerMax Kellermann <max@duempel.org>2009-11-19 19:49:44 +0100
commit21fdf47b563ab7684dc7022aadf5d63bb011ea52 (patch)
tree1ff0be3e915db1cffbbe111d1c6d6daa0620d9ca /src/decoder/_flac_common.c
parentd1aee3ae74716a9f87b6fcc2ae6583c0cb40daec (diff)
downloadmpd-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 'src/decoder/_flac_common.c')
-rw-r--r--src/decoder/_flac_common.c4
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 */