summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-12-20 18:22:58 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-12-20 18:22:58 +0100
commit74722b23317d556e86ad7fb77913c4c864c239c4 (patch)
tree5973fa4e08ca6112b4481270a74e49565ae6fca7 /runtime
parentf112b51b8d6c358b87ac608112d393adb047ea0f (diff)
downloadrsyslog-74722b23317d556e86ad7fb77913c4c864c239c4.tar.gz
rsyslog-74722b23317d556e86ad7fb77913c4c864c239c4.tar.xz
rsyslog-74722b23317d556e86ad7fb77913c4c864c239c4.zip
bugfix: stats counter were not properly initialized on creation
Diffstat (limited to 'runtime')
-rw-r--r--runtime/statsobj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/statsobj.c b/runtime/statsobj.c
index e1a89cf4..131605e0 100644
--- a/runtime/statsobj.c
+++ b/runtime/statsobj.c
@@ -154,9 +154,11 @@ addCounter(statsobj_t *pThis, uchar *ctrName, statsCtrType_t ctrType, void *pCtr
switch(ctrType) {
case ctrType_IntCtr:
ctr->val.pIntCtr = (intctr_t*) pCtr;
+ *(ctr->val.pIntCtr) = 0;
break;
case ctrType_Int:
ctr->val.pInt = (int*) pCtr;
+ *(ctr->val.pInt) = 0;
break;
}
addCtrToList(pThis, ctr);