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/nsd_ptcp.c
static rsRetVal GetRemoteHName(nsd_t* pNsd, uchar** ppszHName)
{
    DEFiRet;
    nsd_ptcp_t* pThis = (nsd_ptcp_t*)pNsd;
    ISOBJ_TYPE_assert(pThis, nsd_ptcp);
    assert(ppszHName != NULL);

    // TODO: how can the RemHost be empty?
    CHKmalloc(*ppszHName = (uchar*)strdup(pThis->pRemHostName == NULL
                                              ? ""
                                              : (char*)pThis->pRemHostName));

finalize_it:
    RETiRet;
}
/* get the remote hostname. The returned hostname must be freed by the
 * caller.
 * rgerhards, 2008-04-24
 */
get the remote hostname. The returned hostname must be freed by the
caller.
get the remote hostname . The returned hostname must be freed by the caller .
static rsRetVal GetRemoteHName(nsd_t* pNsd, uchar** ppszHName)
{
    DEFiRet;
    nsd_ptcp_t* pThis = (nsd_ptcp_t*)pNsd;
    ISOBJ_TYPE_assert(pThis, nsd_ptcp);
    assert(ppszHName != NULL);
    CHKmalloc(*ppszHName = (uchar*)strdup(pThis->pRemHostName == NULL
                                              ? ""
                                              : (char*)pThis->pRemHostName));
finalize_it:
    RETiRet;
}
static rsRetVal GetRemoteHName ( nsd_t * pNsd , uchar * * ppszHName ) { DEFiRet ; nsd_ptcp_t * pThis = ( nsd_ptcp_t * ) pNsd ; ISOBJ_TYPE_assert ( pThis , nsd_ptcp ) ; assert ( ppszHName != NULL ) ; CHKmalloc ( * ppszHName = ( uchar * ) strdup ( pThis -> pRemHostName == NULL ? " " : ( char * ) pThis -> pRemHostName ) ) ; finalize_it : RETiRet ; }
get the remote hostname.
get the remote hostname .
// TODO: how can the RemHost be empty?