summaryrefslogtreecommitdiffstats
path: root/runtime/stringbuf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-16 08:46:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-16 08:46:45 +0200
commit015d17ca70e81ad998e32cdfeed3cd925fd7dedc (patch)
tree9e4a547346b72709551b2122f67a158812330fe0 /runtime/stringbuf.c
parente893a5916473c45d6b90dc2401637fe713133291 (diff)
downloadrsyslog-015d17ca70e81ad998e32cdfeed3cd925fd7dedc.tar.gz
rsyslog-015d17ca70e81ad998e32cdfeed3cd925fd7dedc.tar.xz
rsyslog-015d17ca70e81ad998e32cdfeed3cd925fd7dedc.zip
some performance optimizations
- saved gettimeofday() calls in imtcp (and increased reception buffer) - somewhat optimized stringbuf.c - some other optimizations
Diffstat (limited to 'runtime/stringbuf.c')
-rw-r--r--runtime/stringbuf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/stringbuf.c b/runtime/stringbuf.c
index 07256fab..f3d9aa48 100644
--- a/runtime/stringbuf.c
+++ b/runtime/stringbuf.c
@@ -299,10 +299,8 @@ rsRetVal rsCStrSetSzStr(cstr_t *pThis, uchar *pszNew)
{
rsCHECKVALIDOBJECT(pThis, OIDrsCStr);
- if(pThis->pBuf != NULL)
- free(pThis->pBuf);
- if(pThis->pszBuf != NULL)
- free(pThis->pszBuf);
+ free(pThis->pBuf);
+ free(pThis->pszBuf);
if(pszNew == NULL) {
pThis->iStrLen = 0;
pThis->iBufSize = 0;