diff options
author | Patrick Venture <venture@google.com> | 2018-09-11 18:08:16 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-09-11 18:10:43 -0700 |
commit | af6227a3eb3fc918425d7588e001a75bd348232d (patch) | |
tree | 75123f1c3939cf81306c2a415e9f886e01f0bf2c | |
parent | cc86915b988098032d56a233f4f5de9f3c91f138 (diff) | |
download | phosphor-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.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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)); } } |