loolwsd/DocumentBroker.cpp | 2 +- loolwsd/common/FileUtil.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-)
New commits: commit 5d4aa362404eff5c5ed12ffcce2cefa8e5be409d Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Tue Nov 22 22:06:05 2016 -0500 loolwsd: minor cleanups Change-Id: I9f75b991e6f4bedcffe1dd86f2a5cff2a606bf89 Reviewed-on: https://gerrit.libreoffice.org/31101 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index 949cec5..9fa56ae 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -598,7 +598,7 @@ void DocumentBroker::alertAllUsers(const std::string& msg) { Util::assertIsLocked(_mutex); - LOG_DBG("Alerting all users: " << msg); + LOG_DBG("Alerting all users of [" << _docKey << "]: " << msg); for (auto& it : _sessions) { try diff --git a/loolwsd/common/FileUtil.cpp b/loolwsd/common/FileUtil.cpp index 461513e..19e8e00 100644 --- a/loolwsd/common/FileUtil.cpp +++ b/loolwsd/common/FileUtil.cpp @@ -148,17 +148,18 @@ namespace FileUtil { std::lock_guard<std::mutex> lock(fsmutex); - if (path != "") + if (!path.empty()) { std::string dirPath = path; std::string::size_type lastSlash = dirPath.rfind('/'); assert(lastSlash != std::string::npos); - dirPath = dirPath.substr(0, lastSlash + 1) + "."; + dirPath = dirPath.substr(0, lastSlash + 1) + '.'; struct stat s; - if (stat(dirPath.c_str(), &s) == -1) - return; - filesystems.insert(fs(dirPath, s.st_dev)); + if (stat(dirPath.c_str(), &s) == 0) + { + filesystems.insert(fs(dirPath, s.st_dev)); + } } } @@ -187,7 +188,8 @@ namespace FileUtil bool checkDiskSpace(const std::string& path) { - assert(path != ""); + assert(!path.empty()); + struct statfs sfs; if (statfs(path.c_str(), &sfs) == -1) return true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits