[Coverity] Fix coverity issue
authorDonghak PARK <donghak.park@samsung.com>
Mon, 5 Feb 2024 03:30:40 +0000 (12:30 +0900)
committerjijoong.moon <jijoong.moon@samsung.com>
Wed, 20 Mar 2024 06:20:00 +0000 (15:20 +0900)
Fix Coverity issues
- 1746142
- 1744671

i will fix iteration_queue.cpp's dead lock issue soon

**Changes proposed in this PR:**
- modified:   nntrainer/compiler/ini_interpreter.cpp
- modified:   nntrainer/dataset/dir_data_producers.cpp

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghak PARK <donghak.park@samsung.com>
nntrainer/compiler/ini_interpreter.cpp

index 684660f..1d82ef6 100644 (file)
@@ -348,7 +348,7 @@ GraphRepresentation IniGraphInterpreter::deserialize(const std::string &in) {
         continue;
       }
 
-      if (backbone_path == UNKNOWN_STR) {
+      if (std::strcmp(backbone_path, UNKNOWN_STR) == 0) {
         layer = section2layer<PlainLayer>(ini, sec_name, app_context, "",
                                           pathResolver);
       } else {