diff options
author | Max Kellermann <max@duempel.org> | 2015-11-06 09:37:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-11-06 09:37:07 +0100 |
commit | c880099deb41c09ea7844daa27a42dac4142c0cd (patch) | |
tree | 571482d1e6e7efc95ab7d443f246232188d3c23f /src/storage/plugins/NfsStorage.cxx | |
parent | 42f5ecd4a116c96d30bf407859dadaa9a053ea39 (diff) | |
download | mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.gz mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.xz mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.zip |
util/StringCompare: add StringIsEmpty()
Diffstat (limited to 'src/storage/plugins/NfsStorage.cxx')
-rw-r--r-- | src/storage/plugins/NfsStorage.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx index fc4fd5c07..517e0c93a 100644 --- a/src/storage/plugins/NfsStorage.cxx +++ b/src/storage/plugins/NfsStorage.cxx @@ -30,13 +30,14 @@ #include "lib/nfs/Connection.hxx" #include "lib/nfs/Glue.hxx" #include "fs/AllocatedPath.hxx" -#include "util/Error.hxx" #include "thread/Mutex.hxx" #include "thread/Cond.hxx" #include "event/Loop.hxx" #include "event/Call.hxx" #include "event/DeferredMonitor.hxx" #include "event/TimeoutMonitor.hxx" +#include "util/Error.hxx" +#include "util/StringCompare.hxx" extern "C" { #include <nfsc/libnfs.h> @@ -232,7 +233,7 @@ NfsStorage::MapUTF8(const char *uri_utf8) const { assert(uri_utf8 != nullptr); - if (*uri_utf8 == 0) + if (StringIsEmpty(uri_utf8)) return base; return PathTraitsUTF8::Build(base.c_str(), uri_utf8); |