diff options
author | Denis Dolzhenko <d.dolzhenko@samsung.com> | 2017-07-27 14:06:28 +0300 |
---|---|---|
committer | Denis Dolzhenko <d.dolzhenko@samsung.com> | 2017-07-27 14:10:44 +0300 |
commit | 769064240b115f36a5625de3e3a99804361d6d8e (patch) | |
tree | 599e779c354518550beab7ec77575a5134d9541f | |
parent | 1e7b293916343eb4c4707fe4e4d3bd6ce59d7a2e (diff) | |
download | message-769064240b115f36a5625de3e3a99804361d6d8e.tar.gz message-769064240b115f36a5625de3e3a99804361d6d8e.tar.bz2 message-769064240b115f36a5625de3e3a99804361d6d8e.zip |
Fix: warnings, code style.submit/tizen_4.0/20170811.094300submit/tizen/20170728.083556
Change-Id: I022ff1a3fbd75a1652fe36f52e7f72e51ff10998
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
-rw-r--r-- | src/Common/AppControl/src/ContactViewer.cpp | 2 | ||||
-rwxr-xr-x | src/Common/Utils/src/FileUtils.cpp | 16 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/Common/AppControl/src/ContactViewer.cpp b/src/Common/AppControl/src/ContactViewer.cpp index e8014fc..c47bc61 100644 --- a/src/Common/AppControl/src/ContactViewer.cpp +++ b/src/Common/AppControl/src/ContactViewer.cpp @@ -59,7 +59,7 @@ bool ContactViewer::launch(const ContactAddress &address) return false; clear(); - launchPrivate(address); + return launchPrivate(address); } bool ContactViewer::launch() diff --git a/src/Common/Utils/src/FileUtils.cpp b/src/Common/Utils/src/FileUtils.cpp index 2d7803a..d82f7bc 100755 --- a/src/Common/Utils/src/FileUtils.cpp +++ b/src/Common/Utils/src/FileUtils.cpp @@ -171,32 +171,24 @@ std::string getFileName(const std::string &path) bool remove(const std::string &path, bool removeCurrentDir) { bool res = true; - struct dirent ep; struct dirent *dirData = nullptr; DIR *dp = opendir(path.c_str()); - if (dp) - { - while (true) - { - dirData = nullptr; - readdir_r(dp, &ep, &dirData); + if (dp) { + while (true) { + dirData = readdir(dp); if (dirData == nullptr) break; - if (strcmp(dirData->d_name, ".") != 0 && strcmp(dirData->d_name, "..") != 0) - { + if (strcmp(dirData->d_name, ".") != 0 && strcmp(dirData->d_name, "..") != 0) { std::string child = path + "/" + dirData->d_name; res &= remove(child, true); } } - closedir(dp); if (removeCurrentDir) - { res &= rmdir(path.c_str()) == 0; - } } else { res &= unlink(path.c_str()) == 0; } |