From 21fdf47b563ab7684dc7022aadf5d63bb011ea52 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 19 Nov 2009 19:49:44 +0100 Subject: [PATCH] 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. --- src/decoder/_flac_common.c | 4 +--- 1 file changed, 1 insertion(+), 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 */