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/SmbclientStorage.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/SmbclientStorage.cxx')
-rw-r--r-- | src/storage/plugins/SmbclientStorage.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx index 84b212cd1..a3d392a8a 100644 --- a/src/storage/plugins/SmbclientStorage.cxx +++ b/src/storage/plugins/SmbclientStorage.cxx @@ -25,8 +25,9 @@ #include "lib/smbclient/Init.hxx" #include "lib/smbclient/Mutex.hxx" #include "fs/Traits.hxx" -#include "util/Error.hxx" #include "thread/Mutex.hxx" +#include "util/Error.hxx" +#include "util/StringCompare.hxx" #include <libsmbclient.h> @@ -80,7 +81,7 @@ SmbclientStorage::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); |