Test resize in appendl().

This commit is contained in:
Emil Mikulic 2015-01-01 20:35:37 +11:00
parent 946a910935
commit 6e1f045393
2 changed files with 4 additions and 2 deletions

View File

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

View File

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