Remove code that may fall info infinite loop 05/300305/1
authorilho kim <ilho159.kim@samsung.com>
Fri, 20 Oct 2023 06:24:46 +0000 (15:24 +0900)
committerilho kim <ilho159.kim@samsung.com>
Fri, 20 Oct 2023 06:24:46 +0000 (15:24 +0900)
Change-Id: I8ebbac18e15ec68c0dc215ec619527b5aa93fbca
Signed-off-by: ilho kim <ilho159.kim@samsung.com>
src/wgt/step/encryption/step_encrypt_resources.cc

index 40b6781..448d2f4 100644 (file)
@@ -36,9 +36,9 @@ const std::set<std::string> encryptSet { ".html", ".htm", ".css", ".js"};
 FILE* OpenFile(const bf::path& path, const std::string& mode) {
   FILE* result = nullptr;
 
-  do {
-    result = fopen(path.c_str(), mode.c_str());
-  } while ((nullptr == result));
+  result = fopen(path.c_str(), mode.c_str());
+  if (result == nullptr)
+    LOG(ERROR) << "open [" << path << "] fail, errno : " << errno;
 
   return result;
 }