From 783e6a551721b025bbc7109a2fa2b63b8cf2fe70 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 2 Apr 2019 10:06:22 +0900 Subject: [PATCH] Change strcmp with std::string::compare() Change-Id: I8e74bf8ac80fd42337bde11cb6b3e71dce7845fe --- plugins/wakeup-manager/src/wakeup_engine_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/wakeup-manager/src/wakeup_engine_manager.cpp b/plugins/wakeup-manager/src/wakeup_engine_manager.cpp index ae1b05c..63879aa 100644 --- a/plugins/wakeup-manager/src/wakeup_engine_manager.cpp +++ b/plugins/wakeup-manager/src/wakeup_engine_manager.cpp @@ -35,7 +35,10 @@ void CWakeupEngineManager::initialize() dirp = readdir(dp); if (nullptr != dirp) { - if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name)) + const string current_directory{"."}; + const string parent_directory{".."}; + if (0 == current_directory.compare(dirp->d_name) || + 0 == parent_directory.compare(dirp->d_name)) continue; if (DT_DIR != dirp->d_type) /* If not a directory */ -- 2.34.1