summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-09-11 18:08:16 -0700
committerPatrick Venture <venture@google.com>2018-09-11 18:10:43 -0700
commitaf6227a3eb3fc918425d7588e001a75bd348232d (patch)
tree75123f1c3939cf81306c2a415e9f886e01f0bf2c
parentcc86915b988098032d56a233f4f5de9f3c91f138 (diff)
downloadphosphor-hwmon-af6227a3eb3fc918425d7588e001a75bd348232d.tar.gz
phosphor-hwmon-af6227a3eb3fc918425d7588e001a75bd348232d.zip
minor cleanup: remove unused c header
Change-Id: I562aad32f8b860fc954773428e6a929759c694d3 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--timer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/timer.cpp b/timer.cpp
index a99ec46..72c9f96 100644
--- a/timer.cpp
+++ b/timer.cpp
@@ -1,8 +1,7 @@
#include "timer.hpp"
-#include <string.h>
-
#include <chrono>
+#include <cstring>
#include <system_error>
namespace phosphor
@@ -30,7 +29,7 @@ Timer::Timer(sd_event* event, std::function<void()> callback,
this); // User data
if (r < 0)
{
- throw std::system_error(r, std::generic_category(), strerror(-r));
+ throw std::system_error(r, std::generic_category(), std::strerror(-r));
}
}
@@ -45,12 +44,14 @@ int Timer::timeoutHandler(sd_event_source* eventSource, uint64_t usec,
eventSource, (getTime() + timer->getDuration()).count());
if (r < 0)
{
- throw std::system_error(r, std::generic_category(), strerror(-r));
+ throw std::system_error(r, std::generic_category(),
+ std::strerror(-r));
}
r = sd_event_source_set_enabled(eventSource, timer::ON);
if (r < 0)
{
- throw std::system_error(r, std::generic_category(), strerror(-r));
+ throw std::system_error(r, std::generic_category(),
+ std::strerror(-r));
}
}
OpenPOWER on IntegriCloud