fs/Limits: convert macro to "constexpr"

This commit is contained in:
Max Kellermann
2013-10-17 22:03:58 +02:00
parent 354b5a9365
commit 4817437d31
4 changed files with 12 additions and 13 deletions

View File

@@ -34,7 +34,7 @@ Path ReadLink(const Path &path)
ssize_t size = readlink(path.c_str(), buffer, MPD_PATH_MAX);
if (size < 0)
return Path::Null();
if (size >= MPD_PATH_MAX) {
if (size_t(size) >= MPD_PATH_MAX) {
errno = ENOMEM;
return Path::Null();
}