summaryrefslogtreecommitdiffstats
path: root/outchannel.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-16 11:36:05 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-16 11:36:05 +0200
commitf7579e68a67364c8040966be57c2eae4c9550ee5 (patch)
treeb0e0eb7e54f6fb5db3b6600d0f3fe72a4a0f271e /outchannel.c
parent015d17ca70e81ad998e32cdfeed3cd925fd7dedc (diff)
downloadrsyslog-f7579e68a67364c8040966be57c2eae4c9550ee5.tar.gz
rsyslog-f7579e68a67364c8040966be57c2eae4c9550ee5.tar.xz
rsyslog-f7579e68a67364c8040966be57c2eae4c9550ee5.zip
done various optimizations to the stringbuf and its users
Diffstat (limited to 'outchannel.c')
-rw-r--r--outchannel.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/outchannel.c b/outchannel.c
index 5c348b63..4f8abb32 100644
--- a/outchannel.c
+++ b/outchannel.c
@@ -105,22 +105,22 @@ static rsRetVal get_Field(uchar **pp, uchar **pField)
skip_Comma((char**)pp);
p = *pp;
- CHKiRet(rsCStrConstruct(&pStrB));
+ CHKiRet(cstrConstruct(&pStrB));
rsCStrSetAllocIncrement(pStrB, 32);
/* copy the field */
while(*p && *p != ' ' && *p != ',') {
- CHKiRet(rsCStrAppendChar(pStrB, *p++));
+ CHKiRet(cstrAppendChar(pStrB, *p++));
}
*pp = p;
- CHKiRet(rsCStrFinish(pStrB));
- CHKiRet(rsCStrConvSzStrAndDestruct(pStrB, pField, 0));
+ CHKiRet(cstrFinalize(pStrB));
+ CHKiRet(cstrConvSzStrAndDestruct(pStrB, pField, 0));
finalize_it:
if(iRet != RS_RET_OK) {
if(pStrB != NULL)
- rsCStrDestruct(&pStrB);
+ cstrDestruct(&pStrB);
}
RETiRet;
@@ -174,22 +174,22 @@ static inline rsRetVal get_restOfLine(uchar **pp, uchar **pBuf)
skip_Comma((char**)pp);
p = *pp;
- CHKiRet(rsCStrConstruct(&pStrB));
+ CHKiRet(cstrConstruct(&pStrB));
rsCStrSetAllocIncrement(pStrB, 32);
/* copy the field */
while(*p) {
- CHKiRet(rsCStrAppendChar(pStrB, *p++));
+ CHKiRet(cstrAppendChar(pStrB, *p++));
}
*pp = p;
- CHKiRet(rsCStrFinish(pStrB));
- CHKiRet(rsCStrConvSzStrAndDestruct(pStrB, pBuf, 0));
+ CHKiRet(cstrFinalize(pStrB));
+ CHKiRet(cstrConvSzStrAndDestruct(pStrB, pBuf, 0));
finalize_it:
if(iRet != RS_RET_OK) {
if(pStrB != NULL)
- rsCStrDestruct(&pStrB);
+ cstrDestruct(&pStrB);
}
RETiRet;