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 template* tplConstruct(rsconf_t* conf)
{
    struct template* pTpl;
    if ((pTpl = calloc(1, sizeof(struct template))) == NULL)
        return NULL;

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

    if (conf->templates.last == NULL)
    {
        /* we are the first element! */
        conf->templates.root = conf->templates.last = pTpl;
    }
    else
    {
        conf->templates.last->pNext = pTpl;
        conf->templates.last = pTpl;
    }

    return (pTpl);
}
/* Constructs a template list object. Returns pointer to it
 * or NULL (if it fails).
 */
Constructs a template list object. Returns pointer to it
or NULL (if it fails).
Constructs a template list object . Returns pointer to it or NULL ( if it fails ) .
static struct template* tplConstruct(rsconf_t* conf)
{
    struct template* pTpl;
    if ((pTpl = calloc(1, sizeof(struct template))) == NULL)
        return NULL;
    if (conf->templates.last == NULL)
    {
        conf->templates.root = conf->templates.last = pTpl;
    }
    else
    {
        conf->templates.last->pNext = pTpl;
        conf->templates.last = pTpl;
    }
    return (pTpl);
}
static struct template * tplConstruct ( rsconf_t * conf ) { struct template * pTpl ; if ( ( pTpl = calloc ( 1 , sizeof ( struct template ) ) ) == NULL ) return NULL ; if ( conf -> templates . last == NULL ) { conf -> templates . root = conf -> templates . last = pTpl ; } else { conf -> templates . last -> pNext = pTpl ; conf -> templates . last = pTpl ; } return ( pTpl ) ; }
Constructs a template list object.
Constructs a template list object .
/* basic initialisation is done via calloc() - need to
     * initialize only values != 0. */ /* we are the first element! */