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/net.c
static rsRetVal AddAllowedSenderEntry(struct AllowedSenders** ppRoot,
                                      struct AllowedSenders** ppLast,
                                      struct NetAddr* iAllow,
                                      uint8_t iSignificantBits)
{
    struct AllowedSenders* pEntry = NULL;

    assert(ppRoot != NULL);
    assert(ppLast != NULL);
    assert(iAllow != NULL);

    if ((pEntry = (struct AllowedSenders*)calloc(
             1, sizeof(struct AllowedSenders))) == NULL)
    {
        return RS_RET_OUT_OF_MEMORY; /* no options left :( */
    }

    memcpy(&(pEntry->allowedSender), iAllow, sizeof(struct NetAddr));
    pEntry->pNext = NULL;
    pEntry->SignificantBits = iSignificantBits;

    /* enqueue */
    if (*ppRoot == NULL)
    {
        *ppRoot = pEntry;
    }
    else
    {
        (*ppLast)->pNext = pEntry;
    }
    *ppLast = pEntry;

    return RS_RET_OK;
}
/* This function adds an allowed sender entry to the ACL linked list.
 * In any case, a single entry is added. If an error occurs, the
 * function does its error reporting itself. All validity checks
 * must already have been done by the caller.
 * This is a helper to AddAllowedSender().
 * rgerhards, 2007-07-17
 */
This function adds an allowed sender entry to the ACL linked list.
In any case, a single entry is added. If an error occurs, the
function does its error reporting itself. All validity checks
must already have been done by the caller.
This is a helper to AddAllowedSender().
This function adds an allowed sender entry to the ACL linked list . In any case a single entry is added . If an error occurs the function does its error reporting itself . All validity checks must already have been done by the caller . This is a helper to AddAllowedSender () .
static rsRetVal AddAllowedSenderEntry(struct AllowedSenders** ppRoot,
                                      struct AllowedSenders** ppLast,
                                      struct NetAddr* iAllow,
                                      uint8_t iSignificantBits)
{
    struct AllowedSenders* pEntry = NULL;
    assert(ppRoot != NULL);
    assert(ppLast != NULL);
    assert(iAllow != NULL);
    if ((pEntry = (struct AllowedSenders*)calloc(
             1, sizeof(struct AllowedSenders))) == NULL)
    {
        return RS_RET_OUT_OF_MEMORY; 
    }
    memcpy(&(pEntry->allowedSender), iAllow, sizeof(struct NetAddr));
    pEntry->pNext = NULL;
    pEntry->SignificantBits = iSignificantBits;
    if (*ppRoot == NULL)
    {
        *ppRoot = pEntry;
    }
    else
    {
        (*ppLast)->pNext = pEntry;
    }
    *ppLast = pEntry;
    return RS_RET_OK;
}
static rsRetVal AddAllowedSenderEntry ( struct AllowedSenders * * ppRoot , struct AllowedSenders * * ppLast , struct NetAddr * iAllow , uint8_t iSignificantBits ) { struct AllowedSenders * pEntry = NULL ; assert ( ppRoot != NULL ) ; assert ( ppLast != NULL ) ; assert ( iAllow != NULL ) ; if ( ( pEntry = ( struct AllowedSenders * ) calloc ( 1 , sizeof ( struct AllowedSenders ) ) ) == NULL ) { return RS_RET_OUT_OF_MEMORY ; } memcpy ( & ( pEntry -> allowedSender ) , iAllow , sizeof ( struct NetAddr ) ) ; pEntry -> pNext = NULL ; pEntry -> SignificantBits = iSignificantBits ; if ( * ppRoot == NULL ) { * ppRoot = pEntry ; } else { ( * ppLast ) -> pNext = pEntry ; } * ppLast = pEntry ; return RS_RET_OK ; }
This function adds an allowed sender entry to the ACL linked list.
This function adds an allowed sender entry to the ACL linked list .
/* no options left :( */ /* enqueue */