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/modules.c
static void modUsrDel(modInfo_t* pThis, const char* pszUsr)
{
    modUsr_t* pUsr;
    modUsr_t* pPrev = NULL;

    for (pUsr = pThis->pModUsrRoot; pUsr != NULL; pUsr = pUsr->pNext)
    {
        if (!strcmp(pUsr->pszFile, pszUsr))
            break;
        else
            pPrev = pUsr;
    }

    if (pUsr == NULL)
    {
        dbgprintf("oops - tried to delete user %s from module %s and it wasn't "
                  "registered as one...\n",
                  pszUsr, pThis->pszName);
    }
    else
    {
        if (pPrev == NULL)
        {
            /* This was at the root! */
            pThis->pModUsrRoot = pUsr->pNext;
        }
        else
        {
            pPrev->pNext = pUsr->pNext;
        }
        /* free ressources */
        free(pUsr->pszFile);
        free(pUsr);
        pUsr = NULL; /* just to make sure... */
    }
}
/* remove a user from the current user list
 * rgerhards, 2008-03-11
 */
remove a user from the current user list
rgerhards, 2008-03-11
remove a user from the current user list rgerhards 2008 - 03 - 11
static void modUsrDel(modInfo_t* pThis, const char* pszUsr)
{
    modUsr_t* pUsr;
    modUsr_t* pPrev = NULL;
    for (pUsr = pThis->pModUsrRoot; pUsr != NULL; pUsr = pUsr->pNext)
    {
        if (!strcmp(pUsr->pszFile, pszUsr))
            break;
        else
            pPrev = pUsr;
    }
    if (pUsr == NULL)
    {
        dbgprintf("oops - tried to delete user %s from module %s and it wasn't "
                  "registered as one...\n",
                  pszUsr, pThis->pszName);
    }
    else
    {
        if (pPrev == NULL)
        {
            pThis->pModUsrRoot = pUsr->pNext;
        }
        else
        {
            pPrev->pNext = pUsr->pNext;
        }
        free(pUsr->pszFile);
        free(pUsr);
        pUsr = NULL; 
    }
}
static void modUsrDel ( modInfo_t * pThis , const char * pszUsr ) { modUsr_t * pUsr ; modUsr_t * pPrev = NULL ; for ( pUsr = pThis -> pModUsrRoot ; pUsr != NULL ; pUsr = pUsr -> pNext ) { if ( ! strcmp ( pUsr -> pszFile , pszUsr ) ) break ; else pPrev = pUsr ; } if ( pUsr == NULL ) { dbgprintf ( " " " \n " , pszUsr , pThis -> pszName ) ; } else { if ( pPrev == NULL ) { pThis -> pModUsrRoot = pUsr -> pNext ; } else { pPrev -> pNext = pUsr -> pNext ; } free ( pUsr -> pszFile ) ; free ( pUsr ) ; pUsr = NULL ; } }
remove a user from the current user list
 rgerhards, 2008-03-11
remove a user from the current user list rgerhards 2008 - 03 - 11
/* This was at the root! */ /* free ressources */ /* just to make sure... */