stored_playlist: fixed signed comparison warning

Cast playlist_max_length to off_t before comparing it to stat.st_size.
This commit is contained in:
Max Kellermann 2008-10-26 16:26:44 +01:00
parent 4fa36a15bf
commit 4bc2def15c

View File

@ -332,7 +332,7 @@ spl_append_song(const char *utf8path, struct song *song)
return PLAYLIST_RESULT_ERRNO;
}
if (st.st_size >= ((MPD_PATH_MAX+1) * playlist_max_length)) {
if (st.st_size >= ((MPD_PATH_MAX+1) * (off_t)playlist_max_length)) {
while (fclose(file) != 0 && errno == EINTR);
return PLAYLIST_RESULT_TOO_LARGE;
}