From 65d99117aa535789584fd72a89c18eb717765103 Mon Sep 17 00:00:00 2001 From: axel Date: Sun, 25 Mar 2007 05:38:01 +1000 Subject: [PATCH] Minor code simplification in util.c darcs-hash:20070324193801-ac50b-e45d88fd7de0204467a0f7d52b71ee323f4e3f0d.gz --- util.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/util.c b/util.c index 78a329d8c..e1832730d 100644 --- a/util.c +++ b/util.c @@ -1358,17 +1358,11 @@ int b_append( buffer_t *b, const void *d, ssize_t len ) return 0; } - if( len < 0 ) - { - return 0; - } - - if( b->length <= (b->used + len) ) { size_t l = maxi( b->length*2, - maxi( b->used+len+MIN_SIZE,MIN_SIZE)); - + b->used+len+MIN_SIZE ); + void *d = realloc( b->buff, l ); if( !d ) {