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/rsconf.c
static rsRetVal validateConf(void)
{
    DEFiRet;

    /* some checks */
    if (ourConf->globals.mainQ.iMainMsgQueueNumWorkers < 1)
    {
        LogError(0, NO_ERRCODE,
                 "$MainMsgQueueNumWorkers must be at least 1! Set to 1.\n");
        ourConf->globals.mainQ.iMainMsgQueueNumWorkers = 1;
    }

    if (ourConf->globals.mainQ.MainMsgQueType == QUEUETYPE_DISK)
    {
        errno = 0; /* for logerror! */
        if (glbl.GetWorkDir() == NULL)
        {
            LogError(
                0, NO_ERRCODE,
                "No $WorkDirectory specified - can not run main "
                "message queue in 'disk' mode. Using 'FixedArray' instead.\n");
            ourConf->globals.mainQ.MainMsgQueType = QUEUETYPE_FIXED_ARRAY;
        }
        if (ourConf->globals.mainQ.pszMainMsgQFName == NULL)
        {
            LogError(
                0, NO_ERRCODE,
                "No $MainMsgQueueFileName specified - can not run main "
                "message queue in 'disk' mode. Using 'FixedArray' instead.\n");
            ourConf->globals.mainQ.MainMsgQueType = QUEUETYPE_FIXED_ARRAY;
        }
    }
    RETiRet;
}
/* validate the current configuration, generate error messages, do
 * optimizations, etc, etc,...
 */
validate the current configuration, generate error messages, do
optimizations, etc, etc.
validate the current configuration generate error messages do optimizations etc etc .
static rsRetVal validateConf(void)
{
    DEFiRet;
    if (ourConf->globals.mainQ.iMainMsgQueueNumWorkers < 1)
    {
        LogError(0, NO_ERRCODE,
                 "$MainMsgQueueNumWorkers must be at least 1! Set to 1.\n");
        ourConf->globals.mainQ.iMainMsgQueueNumWorkers = 1;
    }
    if (ourConf->globals.mainQ.MainMsgQueType == QUEUETYPE_DISK)
    {
        errno = 0; 
        if (glbl.GetWorkDir() == NULL)
        {
            LogError(
                0, NO_ERRCODE,
                "No $WorkDirectory specified - can not run main "
                "message queue in 'disk' mode. Using 'FixedArray' instead.\n");
            ourConf->globals.mainQ.MainMsgQueType = QUEUETYPE_FIXED_ARRAY;
        }
        if (ourConf->globals.mainQ.pszMainMsgQFName == NULL)
        {
            LogError(
                0, NO_ERRCODE,
                "No $MainMsgQueueFileName specified - can not run main "
                "message queue in 'disk' mode. Using 'FixedArray' instead.\n");
            ourConf->globals.mainQ.MainMsgQueType = QUEUETYPE_FIXED_ARRAY;
        }
    }
    RETiRet;
}
static rsRetVal validateConf ( void ) { DEFiRet ; if ( ourConf -> globals . mainQ . iMainMsgQueueNumWorkers < 1 ) { LogError ( 0 , NO_ERRCODE , " \n " ) ; ourConf -> globals . mainQ . iMainMsgQueueNumWorkers = 1 ; } if ( ourConf -> globals . mainQ . MainMsgQueType == QUEUETYPE_DISK ) { errno = 0 ; if ( glbl . GetWorkDir ( ) == NULL ) { LogError ( 0 , NO_ERRCODE , " " " \n " ) ; ourConf -> globals . mainQ . MainMsgQueType = QUEUETYPE_FIXED_ARRAY ; } if ( ourConf -> globals . mainQ . pszMainMsgQFName == NULL ) { LogError ( 0 , NO_ERRCODE , " " " \n " ) ; ourConf -> globals . mainQ . MainMsgQueType = QUEUETYPE_FIXED_ARRAY ; } } RETiRet ; }
validate the current configuration, generate error messages, do
 optimizations, etc, etc,...
validate the current configuration generate error messages do optimizations etc etc ...
/* some checks */ /* for logerror! */