From 6d484db9b293aac4b8bd790eb7aead3a806f8c7b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 4 Oct 2024 13:52:55 +0200 Subject: Enable cppcoreguidelines-* checks. --- src/buildtool/system/system_command.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/system/system_command.hpp') diff --git a/src/buildtool/system/system_command.hpp b/src/buildtool/system/system_command.hpp index ade2f54b..909c047a 100644 --- a/src/buildtool/system/system_command.hpp +++ b/src/buildtool/system/system_command.hpp @@ -201,7 +201,7 @@ class SystemCommand { // wait for child to finish and obtain return value int status{}; std::optional retval{std::nullopt}; - do { + while (not retval) { if (::waitpid(pid, &status, 0) == -1) { // this should never happen logger_.Emit(LogLevel::Error, @@ -221,7 +221,7 @@ class SystemCommand { LogLevel::Debug, "Child got killed by signal {}", sig); } // continue waitpid() in case we got STOPSIG from child - } while (not retval); + } return retval; } -- cgit v1.2.3