make format

pull/1/head
Jeff Becker 6 years ago
parent 3ace0dfa63
commit 54366c040c
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1,4 +1,3 @@
---
BasedOnStyle: Google BasedOnStyle: Google
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true' AlignConsecutiveAssignments: 'true'
@ -30,5 +29,3 @@ SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false' SpacesInSquareBrackets: 'false'
Standard: Cpp11 Standard: Cpp11
UseTab: Never UseTab: Never
...

@ -1,20 +1,17 @@
#ifndef LLARP_ROUTING_ENDPOINT_HPP #ifndef LLARP_ROUTING_ENDPOINT_HPP
#define LLARP_ROUTING_ENDPOINT_HPP #define LLARP_ROUTING_ENDPOINT_HPP
#include <llarp/aligned.hpp>
#include <llarp/buffer.h> #include <llarp/buffer.h>
#include <llarp/aligned.hpp>
namespace llarp namespace llarp
{ {
typedef AlignedBuffer< 32 > RoutingEndpoint_t;
typedef AlignedBuffer<32> RoutingEndpoint_t;
/// Interface for end to end crypto between endpoints /// Interface for end to end crypto between endpoints
struct IRoutingEndpoint struct IRoutingEndpoint
{ {
virtual ~IRoutingEndpoint() {}; virtual ~IRoutingEndpoint(){};
}; };
} }

@ -6,7 +6,7 @@ extern "C" {
#endif #endif
#ifndef __FreeBSD__ #ifndef __FreeBSD__
# if !(__APPLE__ && __MACH__) #if !(__APPLE__ && __MACH__)
size_t INLINE size_t INLINE
strnlen(const char* str, size_t sz) strnlen(const char* str, size_t sz)
{ {
@ -15,7 +15,7 @@ strnlen(const char* str, size_t sz)
slen++; slen++;
return slen; return slen;
} }
# endif #endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

@ -99,7 +99,7 @@ namespace llarp
llarp::Info("nodedb_dir configured!"); llarp::Info("nodedb_dir configured!");
ssize_t loaded = llarp_nodedb_load_dir(nodedb, nodedb_dir); ssize_t loaded = llarp_nodedb_load_dir(nodedb, nodedb_dir);
llarp::Info("nodedb_dir configured! loaded ", loaded, " RCs"); llarp::Info("nodedb_dir configured! loaded ", loaded, " RCs");
if (loaded < 0) if(loaded < 0)
{ {
// shouldn't be possible // shouldn't be possible
llarp::Error("nodedb_dir directory doesn't exist"); llarp::Error("nodedb_dir directory doesn't exist");

@ -1,6 +1,6 @@
#include <llarp/crypto_async.h> #include <llarp/crypto_async.h>
#include <llarp/router_contact.h>
#include <llarp/mem.h> #include <llarp/mem.h>
#include <llarp/router_contact.h>
#include <string.h> #include <string.h>
#include <llarp/crypto.hpp> #include <llarp/crypto.hpp>
#include "buffer.hpp" #include "buffer.hpp"
@ -480,5 +480,4 @@ llarp_async_iwp_free(struct llarp_async_iwp *iwp)
{ {
delete iwp; delete iwp;
} }
} }

@ -5,20 +5,20 @@
#if __FreeBSD__ #if __FreeBSD__
// kqueue / kevent // kqueue / kevent
# include <sys/event.h> #include <sys/event.h>
# include <sys/time.h> #include <sys/time.h>
#endif #endif
#if (__APPLE__ && __MACH__) #if(__APPLE__ && __MACH__)
// kqueue / kevent // kqueue / kevent
# include <sys/event.h> #include <sys/event.h>
# include <sys/time.h> #include <sys/time.h>
#endif #endif
// MacOS needs this // MacOS needs this
#ifndef SOCK_NONBLOCK #ifndef SOCK_NONBLOCK
# include <fcntl.h> #include <fcntl.h>
# define SOCK_NONBLOCK O_NONBLOCK #define SOCK_NONBLOCK O_NONBLOCK
#endif #endif
// original upstream // original upstream
@ -201,7 +201,7 @@ struct llarp_kqueue_loop : public llarp_ev_loop
llarp::Addr a(*addr); llarp::Addr a(*addr);
llarp::Info(__FILE__, "bind to ", a); llarp::Info(__FILE__, "bind to ", a);
// FreeBSD handbook said to do this // 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); a._addr4.sin_addr.s_addr = htonl(INADDR_ANY);
if(bind(fd, addr, slen) == -1) if(bind(fd, addr, slen) == -1)

@ -3,9 +3,10 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
struct llarp_alloc { struct llarp_alloc
void *(*alloc)(struct llarp_alloc *mem, size_t sz, size_t align); {
void (*free)(struct llarp_alloc *mem, void *ptr); void *(*alloc)(struct llarp_alloc *mem, size_t sz, size_t align);
void (*free)(struct llarp_alloc *mem, void *ptr);
}; };
namespace llarp namespace llarp

Loading…
Cancel
Save