From 0b02be925a29357f69abbc9e9a58e7c5aaed2eab Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Fri, 31 Aug 2018 11:55:55 -0700 Subject: add .clang-format Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture --- softoff/mainapp.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'softoff/mainapp.cpp') diff --git a/softoff/mainapp.cpp b/softoff/mainapp.cpp index 3a47cc4..3b153a8 100644 --- a/softoff/mainapp.cpp +++ b/softoff/mainapp.cpp @@ -13,13 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include "config.h" + +#include "softoff.hpp" +#include "timer.hpp" + #include -#include + #include +#include #include -#include "softoff.hpp" -#include "config.h" -#include "timer.hpp" // Return -1 on any errors to ensure we follow the calling targets OnFailure= // path @@ -41,7 +44,7 @@ int main(int argc, char** argv) if (r < 0) { log("Failure to create sd_event handler", - entry("ERRNO=0x%X", -r)); + entry("ERRNO=0x%X", -r)); return -1; } @@ -58,22 +61,23 @@ int main(int argc, char** argv) // Wait for client requests until this application has processed // at least one successful SoftPowerOff or we timed out - while(!powerObj.isCompleted() && !powerObj.isTimerExpired()) + while (!powerObj.isCompleted() && !powerObj.isTimerExpired()) { // -1 denotes wait for ever r = sd_event_run(events, (uint64_t)-1); if (r < 0) { log("Failure in processing request", - entry("ERRNO=0x%X", -r)); + entry("ERRNO=0x%X", -r)); return -1; } } // Log an error if we timed out after getting Ack for SMS_ATN and before // getting the Host Shutdown response - if(powerObj.isTimerExpired() && (powerObj.responseReceived() == - phosphor::ipmi::Base::SoftPowerOff::HostResponse::SoftOffReceived)) + if (powerObj.isTimerExpired() && + (powerObj.responseReceived() == + phosphor::ipmi::Base::SoftPowerOff::HostResponse::SoftOffReceived)) { using error = sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout; -- cgit v1.2.1