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 | |
parent | f61ddec38d94f0679a26229c201e6ad9cd77cd4b (diff) | |
download | rsyslog-a3021f86318f5fbec829a73146cf78105490b178.tar.gz rsyslog-a3021f86318f5fbec829a73146cf78105490b178.tar.xz rsyslog-a3021f86318f5fbec829a73146cf78105490b178.zip |
cleaned up stringbuf.c to fix an annoyance reported by Anders Blomdell
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | stringbuf.c | 22 |
2 files changed, 4 insertions, 23 deletions
@@ -1,5 +1,5 @@ --------------------------------------------------------------------------- -Version 2.0.2 STABLE (rgerhards), 2008-02-?? +Version 2.0.2 STABLE (rgerhards), 2008-02-12 - fixed a bug that could cause invalid string handling via strerror_r varmojfekoj provided the patch - many thanks! - added x-info field to rsyslogd startup/shutdown message. Hopefully @@ -13,6 +13,9 @@ Version 2.0.2 STABLE (rgerhards), 2008-02-?? - bugfix: trailing ":" of tag was lost while parsing legacy syslog messages without timestamp - thanks to Anders Blomdell for providing a patch! - bugfix (doc): misspelled config directive, invalid signal info +- applied some doc fixes from Michel Biebl and cleaned up some no longer + needed files suggested by him +- cleaned up stringbuf.c to fix an annoyance reported by Anders Blomdell --------------------------------------------------------------------------- Version 2.0.1 STABLE (rgerhards), 2008-01-24 - fixed a bug in integer conversion - but this function was never called, 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; } |