diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 09:06:10 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 09:06:10 +0000 |
commit | a3021f86318f5fbec829a73146cf78105490b178 (patch) | |
tree | d79853c66e3b9e37a89fbcc4fd8a9823b32296a1 /stringbuf.c | |
parent | f61ddec38d94f0679a26229c201e6ad9cd77cd4b (diff) | |
download | rsyslog-a3021f86318f5fbec829a73146cf78105490b178.tar.gz rsyslog-a3021f86318f5fbec829a73146cf78105490b178.tar.bz2 rsyslog-a3021f86318f5fbec829a73146cf78105490b178.zip |
cleaned up stringbuf.c to fix an annoyance reported by Anders Blomdell
Diffstat (limited to 'stringbuf.c')
-rwxr-xr-x | stringbuf.c | 22 |
1 files changed, 0 insertions, 22 deletions
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; } |