From: Tomasz Swierczek Date: Fri, 4 Aug 2023 04:39:49 +0000 (+0200) Subject: Fix error checking for open X-Git-Tag: accepted/tizen/unified/20230808.011405~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1fea131dcbf5d9dd4dae4801348ee9b51b4c785;p=platform%2Fcore%2Fsecurity%2Fsecurity-manager.git Fix error checking for open stdin should not get closed, but anyway, this should get fixed. Change-Id: Icfeb0e8be0893ec14640f579d7818670d84ef918 --- diff --git a/src/client/client-security-manager.cpp b/src/client/client-security-manager.cpp index 7725f248..2716be8e 100644 --- a/src/client/client-security-manager.cpp +++ b/src/client/client-security-manager.cpp @@ -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; }