summaryrefslogtreecommitdiffstats
path: root/mainapp.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-11-01 16:52:10 -0700
committerPatrick Venture <venture@google.com>2018-11-01 16:59:54 -0700
commitdace680fa404d7c02a68db105fd7b958b4681442 (patch)
tree6d447ced41a2d1ef9bbd8206d52099609cd973d1 /mainapp.cpp
parent3c4a23e7764c7785d18cb30340a6d185022a797a (diff)
downloadphosphor-gpio-monitor-dace680fa404d7c02a68db105fd7b958b4681442.tar.gz
phosphor-gpio-monitor-dace680fa404d7c02a68db105fd7b958b4681442.zip
Add clang-format to repo
Add clang-format to repo. Change-Id: I3f8704d80dd0bdde0706ab189c68cffe6d347995 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'mainapp.cpp')
-rw-r--r--mainapp.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/mainapp.cpp b/mainapp.cpp
index 9ecaad2..2663f8f 100644
--- a/mainapp.cpp
+++ b/mainapp.cpp
@@ -14,13 +14,15 @@
* limitations under the License.
*/
-#include <iostream>
-#include <string>
-#include <systemd/sd-event.h>
-#include <phosphor-logging/log.hpp>
#include "argument.hpp"
#include "monitor.hpp"
+#include <systemd/sd-event.h>
+
+#include <iostream>
+#include <phosphor-logging/log.hpp>
+#include <string>
+
using namespace phosphor::logging;
static void exitWithError(const char* err, char** argv)
{
@@ -63,7 +65,7 @@ int main(int argc, char** argv)
auto target = (options)["target"];
bool continueRun =
- (options["continue"] == phosphor::gpio::ArgumentParser::trueString);
+ (options["continue"] == phosphor::gpio::ArgumentParser::trueString);
sd_event* event = nullptr;
auto r = sd_event_default(&event);
@@ -76,23 +78,19 @@ int main(int argc, char** argv)
event = nullptr;
// Create a monitor object and let it do all the rest
- phosphor::gpio::Monitor monitor(path,
- std::stoi(key),
- std::stoi(polarity),
- target,
- eventP,
- continueRun);
+ phosphor::gpio::Monitor monitor(path, std::stoi(key), std::stoi(polarity),
+ target, eventP, continueRun);
// Wait for client requests until this application has processed
// at least one expected GPIO state change
- while(!monitor.completed())
+ while (!monitor.completed())
{
// -1 denotes wait for ever
r = sd_event_run(eventP.get(), (uint64_t)-1);
if (r < 0)
{
log<level::ERR>("Failure in processing request",
- entry("ERROR=%s", strerror(-r)));
+ entry("ERROR=%s", strerror(-r)));
break;
}
}
OpenPOWER on IntegriCloud