Commit 4bc2def1 authored by Max Kellermann's avatar Max Kellermann

stored_playlist: fixed signed comparison warning

Cast playlist_max_length to off_t before comparing it to stat.st_size.
parent 4fa36a15
...@@ -332,7 +332,7 @@ spl_append_song(const char *utf8path, struct song *song) ...@@ -332,7 +332,7 @@ spl_append_song(const char *utf8path, struct song *song)
return PLAYLIST_RESULT_ERRNO; 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); while (fclose(file) != 0 && errno == EINTR);
return PLAYLIST_RESULT_TOO_LARGE; return PLAYLIST_RESULT_TOO_LARGE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment