From 0b80216d11861fc4a943f1f1358e6d963505bcb1 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 12 Aug 2019 21:03:38 +0000 Subject: [PATCH] Fix format verify --- Makefile | 2 +- llarp/ev/ev_libuv.cpp | 21 ++++++++++----------- llarp/path/path_context.cpp | 17 ++++++++--------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 062193c17..b6bb192ef 100644 --- a/Makefile +++ b/Makefile @@ -244,7 +244,7 @@ format: clang-format -i $$(find jni daemon llarp include libabyss | grep -E '\.[h,c](pp)?$$') format-verify: format - git diff --quiet || echo 'Please run make format!!' && git --no-pager diff && false + git diff --quiet || (echo 'Please run make format!!' && git --no-pager diff ; exit 1) analyze-config: clean mkdir -p '$(BUILD_ROOT)' diff --git a/llarp/ev/ev_libuv.cpp b/llarp/ev/ev_libuv.cpp index 6588832ee..8868f0e65 100644 --- a/llarp/ev/ev_libuv.cpp +++ b/llarp/ev/ev_libuv.cpp @@ -633,17 +633,16 @@ namespace libuv Loop::CloseAll() { llarp::LogInfo("Closing all handles"); - uv_walk( - m_Impl.get(), - [](uv_handle_t* h, void*) { - if(uv_is_closing(h)) - return; - if(h->data && uv_is_active(h)) - { - static_cast< glue* >(h->data)->Close(); - } - }, - nullptr); + uv_walk(m_Impl.get(), + [](uv_handle_t* h, void*) { + if(uv_is_closing(h)) + return; + if(h->data && uv_is_active(h)) + { + static_cast< glue* >(h->data)->Close(); + } + }, + nullptr); } void diff --git a/llarp/path/path_context.cpp b/llarp/path/path_context.cpp index 84a19f575..b2460f84b 100644 --- a/llarp/path/path_context.cpp +++ b/llarp/path/path_context.cpp @@ -164,15 +164,14 @@ namespace llarp HopHandler_ptr PathContext::GetByUpstream(const RouterID& remote, const PathID_t& id) { - auto own = MapGet( - m_OurPaths, id, - [](const PathSet_ptr) -> bool { - // TODO: is this right? - return true; - }, - [remote, id](PathSet_ptr p) -> HopHandler_ptr { - return p->GetByUpstream(remote, id); - }); + auto own = MapGet(m_OurPaths, id, + [](const PathSet_ptr) -> bool { + // TODO: is this right? + return true; + }, + [remote, id](PathSet_ptr p) -> HopHandler_ptr { + return p->GetByUpstream(remote, id); + }); if(own) return own;