openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/template.c
static struct templateEntry* tpeConstruct(struct template* pTpl)
{
    struct templateEntry* pTpe;

    assert(pTpl != NULL);

    if ((pTpe = calloc(1, sizeof(struct templateEntry))) == NULL)
        return NULL;

    /* basic initialization is done via calloc() - need to
     * initialize only values != 0. */

    if (pTpl->pEntryLast == NULL)
    {
        /* we are the first element! */
        pTpl->pEntryRoot = pTpl->pEntryLast = pTpe;
    }
    else
    {
        pTpl->pEntryLast->pNext = pTpe;
        pTpl->pEntryLast = pTpe;
    }
    pTpl->tpenElements++;

    return (pTpe);
}
/* Constructs a template entry object. Returns pointer to it
 * or NULL (if it fails). Pointer to associated template list entry
 * must be provided.
 */
Constructs a template entry object. Returns pointer to it
or NULL (if it fails). Pointer to associated template list entry
must be provided.
Constructs a template entry object . Returns pointer to it or NULL ( if it fails ) . Pointer to associated template list entry must be provided .
static struct templateEntry* tpeConstruct(struct template* pTpl)
{
    struct templateEntry* pTpe;
    assert(pTpl != NULL);
    if ((pTpe = calloc(1, sizeof(struct templateEntry))) == NULL)
        return NULL;
    if (pTpl->pEntryLast == NULL)
    {
        pTpl->pEntryRoot = pTpl->pEntryLast = pTpe;
    }
    else
    {
        pTpl->pEntryLast->pNext = pTpe;
        pTpl->pEntryLast = pTpe;
    }
    pTpl->tpenElements++;
    return (pTpe);
}
static struct templateEntry * tpeConstruct ( struct template * pTpl ) { struct templateEntry * pTpe ; assert ( pTpl != NULL ) ; if ( ( pTpe = calloc ( 1 , sizeof ( struct templateEntry ) ) ) == NULL ) return NULL ; if ( pTpl -> pEntryLast == NULL ) { pTpl -> pEntryRoot = pTpl -> pEntryLast = pTpe ; } else { pTpl -> pEntryLast -> pNext = pTpe ; pTpl -> pEntryLast = pTpe ; } pTpl -> tpenElements ++ ; return ( pTpe ) ; }
Constructs a template entry object.
Constructs a template entry object .
/* basic initialization is done via calloc() - need to
     * initialize only values != 0. */ /* we are the first element! */