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 strmSetDir(strm_t* pThis, uchar* pszDir, size_t iLenDir)
{
    DEFiRet;

    assert(pThis != NULL);
    assert(pszDir != NULL);

    if (iLenDir < 1)
        ABORT_FINALIZE(RS_RET_FILE_PREFIX_MISSING);

    CHKmalloc(pThis->pszDir = malloc(iLenDir + 1));

    memcpy(pThis->pszDir, pszDir, iLenDir + 1); /* always think about the \0! */
    pThis->lenDir = iLenDir;

finalize_it:
    RETiRet;
}
/* set the stream's directory
 * The passed-in string is duplicated. So if the caller does not need
 * it any longer, it must free it.
 * rgerhards, 2008-01-09
 */
set the stream's directory
The passed-in string is duplicated. So if the caller does not need
it any longer, it must free it.
set the stream ' s directory The passed - in string is duplicated . So if the caller does not need it any longer it must free it .
static rsRetVal strmSetDir(strm_t* pThis, uchar* pszDir, size_t iLenDir)
{
    DEFiRet;
    assert(pThis != NULL);
    assert(pszDir != NULL);
    if (iLenDir < 1)
        ABORT_FINALIZE(RS_RET_FILE_PREFIX_MISSING);
    CHKmalloc(pThis->pszDir = malloc(iLenDir + 1));
    memcpy(pThis->pszDir, pszDir, iLenDir + 1); 
    pThis->lenDir = iLenDir;
finalize_it:
    RETiRet;
}
static rsRetVal strmSetDir ( strm_t * pThis , uchar * pszDir , size_t iLenDir ) { DEFiRet ; assert ( pThis != NULL ) ; assert ( pszDir != NULL ) ; if ( iLenDir < 1 ) ABORT_FINALIZE ( RS_RET_FILE_PREFIX_MISSING ) ; CHKmalloc ( pThis -> pszDir = malloc ( iLenDir + 1 ) ) ; memcpy ( pThis -> pszDir , pszDir , iLenDir + 1 ) ; pThis -> lenDir = iLenDir ; finalize_it : RETiRet ; }
set the stream's directory
 The passed-in string is duplicated.
set the stream ' s directory The passed - in string is duplicated .
/* always think about the \0! */