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/runtime/netstrms.c
static rsRetVal CreateStrm(netstrms_t* pThis, netstrm_t** ppStrm)
{
    netstrm_t* pStrm = NULL;
    DEFiRet;

    CHKiRet(objUse(netstrm, DONT_LOAD_LIB));
    CHKiRet(netstrm.Construct(&pStrm));
    /* we copy over our driver structure. We could provide a pointer to
     * ourselves, but that costs some performance on each driver invocation.
     * As we already have hefty indirection (and thus performance toll), I
     * prefer to copy over the function pointers here. -- rgerhards, 2008-04-23
     */
    memcpy(&pStrm->Drvr, &pThis->Drvr, sizeof(pThis->Drvr));
    pStrm->pNS = pThis;

    *ppStrm = pStrm;

finalize_it:
    if (iRet != RS_RET_OK)
    {
        if (pStrm != NULL)
            netstrm.Destruct(&pStrm);
    }
    RETiRet;
}
/* create an instance of a netstrm object. It is initialized with default
 * values. The current driver is used. The caller may set netstrm properties
 * and must call ConstructFinalize().
 */
create an instance of a netstrm object. It is initialized with default
values. The current driver is used. The caller may set netstrm properties
and must call ConstructFinalize().
create an instance of a netstrm object . It is initialized with default values . The current driver is used . The caller may set netstrm properties and must call ConstructFinalize () .
static rsRetVal CreateStrm(netstrms_t* pThis, netstrm_t** ppStrm)
{
    netstrm_t* pStrm = NULL;
    DEFiRet;
    CHKiRet(objUse(netstrm, DONT_LOAD_LIB));
    CHKiRet(netstrm.Construct(&pStrm));
    memcpy(&pStrm->Drvr, &pThis->Drvr, sizeof(pThis->Drvr));
    pStrm->pNS = pThis;
    *ppStrm = pStrm;
finalize_it:
    if (iRet != RS_RET_OK)
    {
        if (pStrm != NULL)
            netstrm.Destruct(&pStrm);
    }
    RETiRet;
}
static rsRetVal CreateStrm ( netstrms_t * pThis , netstrm_t * * ppStrm ) { netstrm_t * pStrm = NULL ; DEFiRet ; CHKiRet ( objUse ( netstrm , DONT_LOAD_LIB ) ) ; CHKiRet ( netstrm . Construct ( & pStrm ) ) ; memcpy ( & pStrm -> Drvr , & pThis -> Drvr , sizeof ( pThis -> Drvr ) ) ; pStrm -> pNS = pThis ; * ppStrm = pStrm ; finalize_it : if ( iRet != RS_RET_OK ) { if ( pStrm != NULL ) netstrm . Destruct ( & pStrm ) ; } RETiRet ; }
create an instance of a netstrm object.
create an instance of a netstrm object .
/* we copy over our driver structure. We could provide a pointer to
     * ourselves, but that costs some performance on each driver invocation.
     * As we already have hefty indirection (and thus performance toll), I
     * prefer to copy over the function pointers here. -- rgerhards, 2008-04-23
     */