From 60213a3621c5fa354fd7b3f3feb1a2a336d5c9ce Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 5 Jun 2019 09:33:35 -0400 Subject: Run "make autostyle." --- src/lib/malloc/malloc.h | 4 ++-- src/lib/malloc/map_anon.c | 18 +++++++++--------- src/lib/malloc/map_anon.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/lib/malloc') diff --git a/src/lib/malloc/malloc.h b/src/lib/malloc/malloc.h index ef6b509ca4..8c81d30dd5 100644 --- a/src/lib/malloc/malloc.h +++ b/src/lib/malloc/malloc.h @@ -48,12 +48,12 @@ void tor_free_(void *mem); raw_free(*tor_free__tmpvar); \ *tor_free__tmpvar=NULL; \ STMT_END -#else +#else /* !(defined(__GNUC__)) */ #define tor_free(p) STMT_BEGIN \ raw_free(p); \ (p)=NULL; \ STMT_END -#endif +#endif /* defined(__GNUC__) */ #define tor_malloc(size) tor_malloc_(size) #define tor_malloc_zero(size) tor_malloc_zero_(size) diff --git a/src/lib/malloc/map_anon.c b/src/lib/malloc/map_anon.c index e2c41ab9c3..219bd706cc 100644 --- a/src/lib/malloc/map_anon.c +++ b/src/lib/malloc/map_anon.c @@ -59,7 +59,7 @@ #define FLAG_NOINHERIT VM_INHERIT_NONE #elif defined(MAP_INHERIT_NONE) #define FLAG_NOINHERIT MAP_INHERIT_NONE -#endif +#endif /* defined(INHERIT_NONE) || ... */ #elif defined(HAVE_MADVISE) @@ -72,7 +72,7 @@ #define FLAG_NOINHERIT MADV_DONTFORK #endif -#endif +#endif /* defined(HAVE_MINHERIT) || ... */ /** * Helper: try to prevent the sz bytes at mem from being swapped @@ -91,7 +91,7 @@ lock_mem(void *mem, size_t sz) (void) sz; return 0; -#endif +#endif /* defined(_WIN32) || ... */ } /** @@ -108,7 +108,7 @@ nodump_mem(void *mem, size_t sz) (void) mem; (void) sz; return 0; -#endif +#endif /* defined(MADV_DONTDUMP) */ } /** @@ -130,19 +130,19 @@ noinherit_mem(void *mem, size_t sz, inherit_res_t *inherit_result_out) *inherit_result_out = INHERIT_RES_ZERO; return 0; } -#endif +#endif /* defined(FLAG_ZERO) */ #ifdef FLAG_NOINHERIT int r2 = MINHERIT(mem, sz, FLAG_NOINHERIT); if (r2 == 0) { *inherit_result_out = INHERIT_RES_DROP; } return r2; -#else +#else /* !(defined(FLAG_NOINHERIT)) */ (void)inherit_result_out; (void)mem; (void)sz; return 0; -#endif +#endif /* defined(FLAG_NOINHERIT) */ } /** @@ -199,7 +199,7 @@ tor_mmap_anonymous(size_t sz, unsigned flags, raw_assert(ptr != NULL); #else ptr = tor_malloc_zero(sz); -#endif +#endif /* defined(_WIN32) || ... */ if (flags & ANONMAP_PRIVATE) { int lock_result = lock_mem(ptr, sz); @@ -234,5 +234,5 @@ tor_munmap_anonymous(void *mapping, size_t sz) #else (void)sz; tor_free(mapping); -#endif +#endif /* defined(_WIN32) || ... */ } diff --git a/src/lib/malloc/map_anon.h b/src/lib/malloc/map_anon.h index 6c02cd6c16..4c4690e12f 100644 --- a/src/lib/malloc/map_anon.h +++ b/src/lib/malloc/map_anon.h @@ -62,7 +62,7 @@ typedef enum { #define NOINHERIT_CAN_FAIL #else #define NOINHERIT_CAN_FAIL -#endif +#endif /* defined(_WIN32) || ... */ void *tor_mmap_anonymous(size_t sz, unsigned flags, inherit_res_t *inherit_result_out); -- cgit v1.2.3-54-g00ecf