diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-21 17:22:32 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-21 17:22:32 +0200 |
commit | 7a15d40a42d6f2b30b70cfee6b5435133ada9ac7 (patch) | |
tree | b5034d0ce2d120600a60f803b7f0233a3c778549 /template.c | |
parent | f4f2a493b05b5d3247994769325598655afe7fe0 (diff) | |
download | rsyslog-7a15d40a42d6f2b30b70cfee6b5435133ada9ac7.tar.gz rsyslog-7a15d40a42d6f2b30b70cfee6b5435133ada9ac7.tar.bz2 rsyslog-7a15d40a42d6f2b30b70cfee6b5435133ada9ac7.zip |
refactor: somewhat simplify property-name-to-id mapping
Diffstat (limited to 'template.c')
-rw-r--r-- | template.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -809,7 +809,7 @@ do_Parameter(uchar **pp, struct template *pTpl) /* got the name */ cstrFinalize(pStrProp); - if(propNameToID(pStrProp, &pTpe->data.field.propid) != RS_RET_OK) { + if(propNameToID(cstrGetSzStrNoNULL(pStrProp), &pTpe->data.field.propid) != RS_RET_OK) { errmsg.LogError(0, RS_RET_TPL_INVLD_PROP, "template '%s': invalid parameter '%s'", pTpl->pszName, cstrGetSzStrNoNULL(pStrProp)); cstrDestruct(&pStrProp); @@ -1604,7 +1604,7 @@ createPropertyTpe(struct template *pTpl, struct cnfobj *o) /* apply */ CHKmalloc(pTpe = tpeConstruct(pTpl)); pTpe->eEntryType = FIELD; - CHKiRet(propNameToID(name, &pTpe->data.field.propid)); + CHKiRet(propNameToID(cstrGetSzStrNoNULL(name), &pTpe->data.field.propid)); if(pTpe->data.field.propid == PROP_CEE) { /* in CEE case, we need to preserve the actual property name */ pTpe->data.field.propName = ustrdup(cstrGetSzStrNoNULL(name)+1); |