Change strcmp with std::string::compare()
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 2 Apr 2019 01:06:22 +0000 (10:06 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 2 Apr 2019 01:06:29 +0000 (10:06 +0900)
Change-Id: I8e74bf8ac80fd42337bde11cb6b3e71dce7845fe

plugins/wakeup-manager/src/wakeup_engine_manager.cpp

index ae1b05c..63879aa 100644 (file)
@@ -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 */