openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nss-pam-ldapd/0.9.8-r0/nss-pam-ldapd-0.9.8/nslcd/log.c
static void addlogging(int loglevel, const char* scheme, FILE* fp)
{
    struct log_cfg *tmp, *lst;
    /* create new logstruct */
    tmp = (struct log_cfg*)malloc(sizeof(struct log_cfg));
    if (tmp == NULL)
    {
        log_log(LOG_CRIT, "malloc() returned NULL");
        exit(EXIT_FAILURE);
    }
    tmp->loglevel = loglevel;
    tmp->scheme = scheme;
    tmp->fp = fp;
    tmp->next = NULL;
    /* save the struct in the list */
    if (loglist == NULL)
        loglist = tmp;
    else
    {
        for (lst = loglist; lst->next != NULL; lst = lst->next)
            ;
        lst->next = tmp;
    }
}
/* add logging method to configuration list */
add logging method to configuration list
add logging method to configuration list
static void addlogging(int loglevel, const char* scheme, FILE* fp)
{
    struct log_cfg *tmp, *lst;
    tmp = (struct log_cfg*)malloc(sizeof(struct log_cfg));
    if (tmp == NULL)
    {
        log_log(LOG_CRIT, "malloc() returned NULL");
        exit(EXIT_FAILURE);
    }
    tmp->loglevel = loglevel;
    tmp->scheme = scheme;
    tmp->fp = fp;
    tmp->next = NULL;
    if (loglist == NULL)
        loglist = tmp;
    else
    {
        for (lst = loglist; lst->next != NULL; lst = lst->next)
            ;
        lst->next = tmp;
    }
}
static void addlogging ( int loglevel , const char * scheme , FILE * fp ) { struct log_cfg * tmp , * lst ; tmp = ( struct log_cfg * ) malloc ( sizeof ( struct log_cfg ) ) ; if ( tmp == NULL ) { log_log ( LOG_CRIT , " " ) ; exit ( EXIT_FAILURE ) ; } tmp -> loglevel = loglevel ; tmp -> scheme = scheme ; tmp -> fp = fp ; tmp -> next = NULL ; if ( loglist == NULL ) loglist = tmp ; else { for ( lst = loglist ; lst -> next != NULL ; lst = lst -> next ) ; lst -> next = tmp ; } }
add logging method to configuration list
add logging method to configuration list
/* create new logstruct */ /* save the struct in the list */