diff --git a/.clang-format b/.clang-format index f39ade302..76d91cd6f 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,3 @@ ---- BasedOnStyle: Google AlignAfterOpenBracket: Align AlignConsecutiveAssignments: 'true' @@ -30,5 +29,3 @@ SpacesInParentheses: 'false' SpacesInSquareBrackets: 'false' Standard: Cpp11 UseTab: Never - -... diff --git a/include/llarp/routing_endpoint.hpp b/include/llarp/routing_endpoint.hpp index cfc652a8b..cd81fc50f 100644 --- a/include/llarp/routing_endpoint.hpp +++ b/include/llarp/routing_endpoint.hpp @@ -1,20 +1,17 @@ #ifndef LLARP_ROUTING_ENDPOINT_HPP #define LLARP_ROUTING_ENDPOINT_HPP -#include #include - +#include namespace llarp { - - typedef AlignedBuffer<32> RoutingEndpoint_t; + typedef AlignedBuffer< 32 > RoutingEndpoint_t; /// Interface for end to end crypto between endpoints struct IRoutingEndpoint { - virtual ~IRoutingEndpoint() {}; - + virtual ~IRoutingEndpoint(){}; }; } diff --git a/include/llarp/string.h b/include/llarp/string.h index 5e3983fd8..33413e556 100644 --- a/include/llarp/string.h +++ b/include/llarp/string.h @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef __FreeBSD__ -# if !(__APPLE__ && __MACH__) +#if !(__APPLE__ && __MACH__) size_t INLINE strnlen(const char* str, size_t sz) { @@ -15,7 +15,7 @@ strnlen(const char* str, size_t sz) slen++; return slen; } -# endif +#endif #endif #ifdef __cplusplus diff --git a/llarp/context.cpp b/llarp/context.cpp index 39a12e2ff..e5ccb7052 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -99,7 +99,7 @@ namespace llarp llarp::Info("nodedb_dir configured!"); ssize_t loaded = llarp_nodedb_load_dir(nodedb, nodedb_dir); llarp::Info("nodedb_dir configured! loaded ", loaded, " RCs"); - if (loaded < 0) + if(loaded < 0) { // shouldn't be possible llarp::Error("nodedb_dir directory doesn't exist"); diff --git a/llarp/crypto_async.cpp b/llarp/crypto_async.cpp index 47738db4d..05a016a78 100644 --- a/llarp/crypto_async.cpp +++ b/llarp/crypto_async.cpp @@ -1,6 +1,6 @@ #include -#include #include +#include #include #include #include "buffer.hpp" @@ -480,5 +480,4 @@ llarp_async_iwp_free(struct llarp_async_iwp *iwp) { delete iwp; } - } diff --git a/llarp/ev_kqueue.hpp b/llarp/ev_kqueue.hpp index 15e9ba399..96a070af7 100644 --- a/llarp/ev_kqueue.hpp +++ b/llarp/ev_kqueue.hpp @@ -5,20 +5,20 @@ #if __FreeBSD__ // kqueue / kevent -# include -# include +#include +#include #endif -#if (__APPLE__ && __MACH__) +#if(__APPLE__ && __MACH__) // kqueue / kevent -# include -# include +#include +#include #endif // MacOS needs this #ifndef SOCK_NONBLOCK -# include -# define SOCK_NONBLOCK O_NONBLOCK +#include +#define SOCK_NONBLOCK O_NONBLOCK #endif // original upstream @@ -201,7 +201,7 @@ struct llarp_kqueue_loop : public llarp_ev_loop llarp::Addr a(*addr); llarp::Info(__FILE__, "bind to ", a); // FreeBSD handbook said to do this - if (addr->sa_family == AF_INET && INADDR_ANY) + if(addr->sa_family == AF_INET && INADDR_ANY) a._addr4.sin_addr.s_addr = htonl(INADDR_ANY); if(bind(fd, addr, slen) == -1) diff --git a/llarp/mem_std.cpp b/llarp/mem_std.cpp index ec492acb2..4293ede87 100644 --- a/llarp/mem_std.cpp +++ b/llarp/mem_std.cpp @@ -3,9 +3,10 @@ #include #include -struct llarp_alloc { - void *(*alloc)(struct llarp_alloc *mem, size_t sz, size_t align); - void (*free)(struct llarp_alloc *mem, void *ptr); +struct llarp_alloc +{ + void *(*alloc)(struct llarp_alloc *mem, size_t sz, size_t align); + void (*free)(struct llarp_alloc *mem, void *ptr); }; namespace llarp