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.
This commit is contained in:
Max Kellermann 2009-11-19 19:49:44 +01:00
parent d1aee3ae74
commit 21fdf47b56
1 changed files with 1 additions and 3 deletions

View File

@ -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 */