From 7a15d40a42d6f2b30b70cfee6b5435133ada9ac7 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 21 Oct 2013 17:22:32 +0200 Subject: refactor: somewhat simplify property-name-to-id mapping --- template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'template.c') diff --git a/template.c b/template.c index 92728607..b09a3515 100644 --- a/template.c +++ b/template.c @@ -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); -- cgit v1.2.3