From a3021f86318f5fbec829a73146cf78105490b178 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 12 Feb 2008 09:06:10 +0000 Subject: cleaned up stringbuf.c to fix an annoyance reported by Anders Blomdell --- stringbuf.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'stringbuf.c') diff --git a/stringbuf.c b/stringbuf.c index 902831ef..01467f4d 100755 --- a/stringbuf.c +++ b/stringbuf.c @@ -380,28 +380,6 @@ finalize_it: rsRetVal rsCStrFinish(rsCStrObj __attribute__((unused)) *pThis) { rsCHECKVALIDOBJECT(pThis, OIDrsCStr); - -# if STRINGBUF_TRIM_ALLOCSIZE == 1 - /* in this mode, we need to trim the string. To do - * so, we must allocate a new buffer of the exact - * string size, and then copy the old one over. - * This new buffer is then to be returned. - */ - if((pRetBuf = malloc((pThis->iBufSize) * sizeof(uchar))) == NULL) - { /* OK, in this case we use the previous buffer. At least - * we have it ;) - */ - } - else - { /* got the new buffer, so let's use it */ - uchar* pBuf; - memcpy(pBuf, pThis->pBuf, pThis->iBufPtr + 1); - pThis->pBuf = pBuf; - } -# else - /* here, we need to do ... nothing ;) - */ -# endif return RS_RET_OK; } -- cgit v1.2.3