aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-05-11 10:45:20 +0200
committervan Hauser <vh@thc.org>2020-05-11 10:45:20 +0200
commit41f6aa794022d9cd34642ac7b57a70c9094f0e8c (patch)
treec08915b02f292a4eea591e3e8434dcc16ee431b8 /include
parent50a63777ec4b3de137aaa6968b738b084dccf007 (diff)
downloadafl++-41f6aa794022d9cd34642ac7b57a70c9094f0e8c.tar.gz
bigger initial map when LTO
Diffstat (limited to 'include')
-rw-r--r--include/alloc-inl.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/include/alloc-inl.h b/include/alloc-inl.h
index a8483a9e..485446de 100644
--- a/include/alloc-inl.h
+++ b/include/alloc-inl.h
@@ -233,19 +233,17 @@ static inline u8 *DFL_ck_memdup_str(u8 *mem, u32 size) {
/* User-facing macro to sprintf() to a dynamically allocated buffer. */
-#define alloc_printf(_str...) \
- ({ \
- \
- \
- \
- u8 *_tmp; \
- s32 _len = snprintf(NULL, 0, _str); \
- if (_len < 0) FATAL("Whoa, snprintf() fails?!"); \
- _tmp = ck_alloc(_len + 1); \
- snprintf((char *)_tmp, _len + 1, _str); \
- _tmp;
-
-})
+#define alloc_printf(_str...) \
+ ({ \
+ \
+ u8 *_tmp; \
+ s32 _len = snprintf(NULL, 0, _str); \
+ if (_len < 0) FATAL("Whoa, snprintf() fails?!"); \
+ _tmp = ck_alloc(_len + 1); \
+ snprintf((char *)_tmp, _len + 1, _str); \
+ _tmp; \
+ \
+ })
/* Macro to enforce allocation limits as a last-resort defense against
integer overflows. */
@@ -263,9 +261,7 @@ static inline u8 *DFL_ck_memdup_str(u8 *mem, u32 size) {
\
if (!(_r)) ABORT("Out of memory: can't allocate %u bytes", (_s)); \
\
- }
-
-while (0)
+ } while (0)
/* Magic tokens used to mark used / freed chunks. */