From 6e1f04539366f2277ce330a09d5e0c01b9226d6e Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Thu, 1 Jan 2015 20:35:37 +1100 Subject: [PATCH] Test resize in appendl(). --- darkhttpd.c | 4 +++- devel/cover | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/darkhttpd.c b/darkhttpd.c index 5e513f4..4ea47b0 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -387,7 +387,9 @@ static unsigned int xasprintf(char **ret, const char *format, ...) { /* Append buffer code. A somewhat efficient string buffer with pool-based * reallocation. */ -#define APBUF_INIT 4096 +#ifndef APBUF_INIT +# define APBUF_INIT 4096 +#endif #define APBUF_GROW APBUF_INIT struct apbuf { size_t length, pool; diff --git a/devel/cover b/devel/cover index d59d216..5e42800 100755 --- a/devel/cover +++ b/devel/cover @@ -13,7 +13,7 @@ if [ ! -e test.py ]; then fi if [ \( ! -x a.out \) -o \( ../darkhttpd.c -nt a.out \) ]; then echo "===> building a.out, darkhttpd.gcno" - $CC -g -O2 -fprofile-arcs -ftest-coverage -DDEBUG ../darkhttpd.c || exit 1 + $CC -g -O2 -fprofile-arcs -ftest-coverage -DDEBUG -DAPBUF_INIT=1 ../darkhttpd.c || exit 1 fi if [ -e $DIR ]; then rm -rf $DIR || exit 1