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
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
@ -30,5 +29,3 @@ SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Cpp11
UseTab: Never
...

@ -1,20 +1,17 @@
#ifndef LLARP_ROUTING_ENDPOINT_HPP
#define LLARP_ROUTING_ENDPOINT_HPP
#include <llarp/aligned.hpp>
#include <llarp/buffer.h>
#include <llarp/aligned.hpp>
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(){};
};
}

@ -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

@ -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");

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

@ -5,20 +5,20 @@
#if __FreeBSD__
// kqueue / kevent
# include <sys/event.h>
# include <sys/time.h>
#include <sys/event.h>
#include <sys/time.h>
#endif
#if (__APPLE__ && __MACH__)
#if(__APPLE__ && __MACH__)
// kqueue / kevent
# include <sys/event.h>
# include <sys/time.h>
#include <sys/event.h>
#include <sys/time.h>
#endif
// MacOS needs this
#ifndef SOCK_NONBLOCK
# include <fcntl.h>
# define SOCK_NONBLOCK O_NONBLOCK
#include <fcntl.h>
#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)

@ -3,9 +3,10 @@
#include <cstdlib>
#include <cstring>
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

Loading…
Cancel
Save