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 int TCPSessGetNxtSess(tcpsrv_t* pThis, int iCurr)
{
    register int i;

    ISOBJ_TYPE_assert(pThis, tcpsrv);
    assert(pThis->pSessions != NULL);
    for (i = iCurr + 1; i < pThis->iSessMax; ++i)
    {
        if (pThis->pSessions[i] != NULL)
            break;
    }

    return ((i < pThis->iSessMax) ? i : -1);
}
/* Get the next session index. Free session tables entries are
 * skipped. This function is provided the index of the last
 * session entry, or -1 if no previous entry was obtained. It
 * returns the index of the next session or -1, if there is no
 * further entry in the table. Please note that the initial call
 * might as well return -1, if there is no session at all in the
 * session table.
 */
Get the next session index. Free session tables entries are
skipped. This function is provided the index of the last
session entry, or -1 if no previous entry was obtained. It
returns the index of the next session or -1, if there is no
further entry in the table. Please note that the initial call
might as well return -1, if there is no session at all in the
session table.
Get the next session index . Free session tables entries are skipped . This function is provided the index of the last session entry or - 1 if no previous entry was obtained . It returns the index of the next session or - 1 if there is no further entry in the table . Please note that the initial call might as well return - 1 if there is no session at all in the session table .
static int TCPSessGetNxtSess(tcpsrv_t* pThis, int iCurr)
{
    register int i;
    ISOBJ_TYPE_assert(pThis, tcpsrv);
    assert(pThis->pSessions != NULL);
    for (i = iCurr + 1; i < pThis->iSessMax; ++i)
    {
        if (pThis->pSessions[i] != NULL)
            break;
    }
    return ((i < pThis->iSessMax) ? i : -1);
}
static int TCPSessGetNxtSess ( tcpsrv_t * pThis , int iCurr ) { register int i ; ISOBJ_TYPE_assert ( pThis , tcpsrv ) ; assert ( pThis -> pSessions != NULL ) ; for ( i = iCurr + 1 ; i < pThis -> iSessMax ; ++ i ) { if ( pThis -> pSessions [ i ] != NULL ) break ; } return ( ( i < pThis -> iSessMax ) ? i : -1 ) ; }
Get the next session index.
Get the next session index .