add .clang-format
Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/timer.cpp b/timer.cpp
index 06965de..f1887fd 100644
--- a/timer.cpp
+++ b/timer.cpp
@@ -1,6 +1,7 @@
+#include "timer.hpp"
+
#include <chrono>
#include <phosphor-logging/log.hpp>
-#include "timer.hpp"
namespace phosphor
{
namespace ipmi
@@ -27,7 +28,7 @@
if (r < 0)
{
log<level::ERR>("Failure to set initial expiration time value",
- entry("ERROR=%s", strerror(-r)));
+ entry("ERROR=%s", strerror(-r)));
throw std::runtime_error("Timer initialization failed");
}
@@ -37,7 +38,7 @@
if (r < 0)
{
log<level::ERR>("Failure to disable timer",
- entry("ERROR=%s", strerror(-r)));
+ entry("ERROR=%s", strerror(-r)));
throw std::runtime_error("Disabling the timer failed");
}
@@ -45,15 +46,15 @@
}
/** @brief callback handler on timeout */
-int Timer::timeoutHandler(sd_event_source* eventSource,
- uint64_t usec, void* userData)
+int Timer::timeoutHandler(sd_event_source* eventSource, uint64_t usec,
+ void* userData)
{
auto timer = static_cast<Timer*>(userData);
timer->expired = true;
log<level::INFO>("Timer expired");
// Call optional user call back function if available
- if(timer->userCallBack)
+ if (timer->userCallBack)
{
timer->userCallBack();
}
@@ -91,7 +92,7 @@
if (r < 0)
{
log<level::ERR>("Failure to set timer",
- entry("ERROR=%s", strerror(-r)));
+ entry("ERROR=%s", strerror(-r)));
return r;
}
@@ -101,7 +102,7 @@
if (r < 0)
{
log<level::ERR>("Failure to start timer",
- entry("ERROR=%s", strerror(-r)));
+ entry("ERROR=%s", strerror(-r)));
}
return r;
}