Fix error checking for open 55/296755/2
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 4 Aug 2023 04:39:49 +0000 (06:39 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Fri, 4 Aug 2023 06:24:12 +0000 (06:24 +0000)
stdin should not get closed, but anyway, this should get fixed.

Change-Id: Icfeb0e8be0893ec14640f579d7818670d84ef918

src/client/client-security-manager.cpp

index 7725f24..2716be8 100644 (file)
@@ -123,7 +123,7 @@ std::string readThreadLabel(int tid)
     label[0] = 0;
 
     fd = open(path.c_str(), O_RDONLY);
-    if (fd <= 0) {
+    if (fd < 0) {
         LogWarning("Failed to open " << path);
         return label;
     }