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/tcpsrv.c
static rsRetVal TCPSessTblInit(tcpsrv_t* pThis)
{
    DEFiRet;

    ISOBJ_TYPE_assert(pThis, tcpsrv);
    assert(pThis->pSessions == NULL);

    DBGPRINTF("Allocating buffer for %d TCP sessions.\n", pThis->iSessMax);
    if ((pThis->pSessions = (tcps_sess_t**)calloc(
             pThis->iSessMax, sizeof(tcps_sess_t*))) == NULL)
    {
        DBGPRINTF("Error: TCPSessInit() could not alloc memory for TCP session "
                  "table.\n");
        ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
    }

finalize_it:
    RETiRet;
}
/* Initialize the session table
 * returns 0 if OK, somewhat else otherwise
 */
Initialize the session table
returns 0 if OK, somewhat else otherwise
Initialize the session table returns 0 if OK somewhat else otherwise
static rsRetVal TCPSessTblInit(tcpsrv_t* pThis)
{
    DEFiRet;
    ISOBJ_TYPE_assert(pThis, tcpsrv);
    assert(pThis->pSessions == NULL);
    DBGPRINTF("Allocating buffer for %d TCP sessions.\n", pThis->iSessMax);
    if ((pThis->pSessions = (tcps_sess_t**)calloc(
             pThis->iSessMax, sizeof(tcps_sess_t*))) == NULL)
    {
        DBGPRINTF("Error: TCPSessInit() could not alloc memory for TCP session "
                  "table.\n");
        ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
    }
finalize_it:
    RETiRet;
}
static rsRetVal TCPSessTblInit ( tcpsrv_t * pThis ) { DEFiRet ; ISOBJ_TYPE_assert ( pThis , tcpsrv ) ; assert ( pThis -> pSessions == NULL ) ; DBGPRINTF ( " \n " , pThis -> iSessMax ) ; if ( ( pThis -> pSessions = ( tcps_sess_t * * ) calloc ( pThis -> iSessMax , sizeof ( tcps_sess_t * ) ) ) == NULL ) { DBGPRINTF ( " " " \n " ) ; ABORT_FINALIZE ( RS_RET_OUT_OF_MEMORY ) ; } finalize_it : RETiRet ; }
Initialize the session table
 returns 0 if OK, somewhat else otherwise
Initialize the session table returns 0 if OK somewhat else otherwise