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/stream.c
static rsRetVal strmDup(strm_t* const pThis, strm_t** ppNew)
{
    strm_t* pNew = NULL;
    DEFiRet;

    ISOBJ_TYPE_assert(pThis, strm);
    assert(ppNew != NULL);

    CHKiRet(strmConstruct(&pNew));
    pNew->sType = pThis->sType;
    pNew->iCurrFNum = pThis->iCurrFNum;
    CHKmalloc(pNew->pszFName = ustrdup(pThis->pszFName));
    pNew->lenFName = pThis->lenFName;
    CHKmalloc(pNew->pszDir = ustrdup(pThis->pszDir));
    pNew->lenDir = pThis->lenDir;
    pNew->tOperationsMode = pThis->tOperationsMode;
    pNew->tOpenMode = pThis->tOpenMode;
    pNew->iMaxFileSize = pThis->iMaxFileSize;
    pNew->iMaxFiles = pThis->iMaxFiles;
    pNew->iFileNumDigits = pThis->iFileNumDigits;
    pNew->bDeleteOnClose = pThis->bDeleteOnClose;
    pNew->iCurrOffs = pThis->iCurrOffs;

    *ppNew = pNew;
    pNew = NULL;

finalize_it:
    if (pNew != NULL)
        strmDestruct(&pNew);

    RETiRet;
}
/* duplicate a stream object excluding dynamic properties. This function is
 * primarily meant to provide a duplicate that later on can be used to access
 * the data. This is needed, for example, for a restart of the disk queue.
 * Note that ConstructFinalize() is NOT called. So our caller may change some
 * properties before finalizing things.
 * rgerhards, 2009-05-26
 */
duplicate a stream object excluding dynamic properties. This function is
primarily meant to provide a duplicate that later on can be used to access
the data. This is needed, for example, for a restart of the disk queue.
Note that ConstructFinalize() is NOT called. So our caller may change some
properties before finalizing things.
duplicate a stream object excluding dynamic properties . This function is primarily meant to provide a duplicate that later on can be used to access the data . This is needed for example for a restart of the disk queue . Note that ConstructFinalize () is NOT called . So our caller may change some properties before finalizing things .
static rsRetVal strmDup(strm_t* const pThis, strm_t** ppNew)
{
    strm_t* pNew = NULL;
    DEFiRet;
    ISOBJ_TYPE_assert(pThis, strm);
    assert(ppNew != NULL);
    CHKiRet(strmConstruct(&pNew));
    pNew->sType = pThis->sType;
    pNew->iCurrFNum = pThis->iCurrFNum;
    CHKmalloc(pNew->pszFName = ustrdup(pThis->pszFName));
    pNew->lenFName = pThis->lenFName;
    CHKmalloc(pNew->pszDir = ustrdup(pThis->pszDir));
    pNew->lenDir = pThis->lenDir;
    pNew->tOperationsMode = pThis->tOperationsMode;
    pNew->tOpenMode = pThis->tOpenMode;
    pNew->iMaxFileSize = pThis->iMaxFileSize;
    pNew->iMaxFiles = pThis->iMaxFiles;
    pNew->iFileNumDigits = pThis->iFileNumDigits;
    pNew->bDeleteOnClose = pThis->bDeleteOnClose;
    pNew->iCurrOffs = pThis->iCurrOffs;
    *ppNew = pNew;
    pNew = NULL;
finalize_it:
    if (pNew != NULL)
        strmDestruct(&pNew);
    RETiRet;
}
static rsRetVal strmDup ( strm_t * const pThis , strm_t * * ppNew ) { strm_t * pNew = NULL ; DEFiRet ; ISOBJ_TYPE_assert ( pThis , strm ) ; assert ( ppNew != NULL ) ; CHKiRet ( strmConstruct ( & pNew ) ) ; pNew -> sType = pThis -> sType ; pNew -> iCurrFNum = pThis -> iCurrFNum ; CHKmalloc ( pNew -> pszFName = ustrdup ( pThis -> pszFName ) ) ; pNew -> lenFName = pThis -> lenFName ; CHKmalloc ( pNew -> pszDir = ustrdup ( pThis -> pszDir ) ) ; pNew -> lenDir = pThis -> lenDir ; pNew -> tOperationsMode = pThis -> tOperationsMode ; pNew -> tOpenMode = pThis -> tOpenMode ; pNew -> iMaxFileSize = pThis -> iMaxFileSize ; pNew -> iMaxFiles = pThis -> iMaxFiles ; pNew -> iFileNumDigits = pThis -> iFileNumDigits ; pNew -> bDeleteOnClose = pThis -> bDeleteOnClose ; pNew -> iCurrOffs = pThis -> iCurrOffs ; * ppNew = pNew ; pNew = NULL ; finalize_it : if ( pNew != NULL ) strmDestruct ( & pNew ) ; RETiRet ; }
duplicate a stream object excluding dynamic properties.
duplicate a stream object excluding dynamic properties .