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/glbl.c
static rsRetVal addTimezoneInfo(uchar* tzid, char offsMode, int8_t offsHour,
                                int8_t offsMin)
{
    DEFiRet;
    tzinfo_t* newti;
    CHKmalloc(newti = realloc(tzinfos, (ntzinfos + 1) * sizeof(tzinfo_t)));
    if ((newti[ntzinfos].id = strdup((char*)tzid)) == NULL)
    {
        free(newti);
        DBGPRINTF("addTimezoneInfo: strdup failed with OOM\n");
        ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
    }
    newti[ntzinfos].offsMode = offsMode;
    newti[ntzinfos].offsHour = offsHour;
    newti[ntzinfos].offsMin = offsMin;
    ++ntzinfos, tzinfos = newti;
finalize_it:
    RETiRet;
}
/* Note: this function is NOT thread-safe!
 * This is currently not needed as used only during
 * initialization.
 */
this function is NOT thread-safe.
This is currently not needed as used only during
initialization.
this function is NOT thread - safe . This is currently not needed as used only during initialization .
static rsRetVal addTimezoneInfo(uchar* tzid, char offsMode, int8_t offsHour,
                                int8_t offsMin)
{
    DEFiRet;
    tzinfo_t* newti;
    CHKmalloc(newti = realloc(tzinfos, (ntzinfos + 1) * sizeof(tzinfo_t)));
    if ((newti[ntzinfos].id = strdup((char*)tzid)) == NULL)
    {
        free(newti);
        DBGPRINTF("addTimezoneInfo: strdup failed with OOM\n");
        ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
    }
    newti[ntzinfos].offsMode = offsMode;
    newti[ntzinfos].offsHour = offsHour;
    newti[ntzinfos].offsMin = offsMin;
    ++ntzinfos, tzinfos = newti;
finalize_it:
    RETiRet;
}
static rsRetVal addTimezoneInfo ( uchar * tzid , char offsMode , int8_t offsHour , int8_t offsMin ) { DEFiRet ; tzinfo_t * newti ; CHKmalloc ( newti = realloc ( tzinfos , ( ntzinfos + 1 ) * sizeof ( tzinfo_t ) ) ) ; if ( ( newti [ ntzinfos ] . id = strdup ( ( char * ) tzid ) ) == NULL ) { free ( newti ) ; DBGPRINTF ( " \n " ) ; ABORT_FINALIZE ( RS_RET_OUT_OF_MEMORY ) ; } newti [ ntzinfos ] . offsMode = offsMode ; newti [ ntzinfos ] . offsHour = offsHour ; newti [ ntzinfos ] . offsMin = offsMin ; ++ ntzinfos , tzinfos = newti ; finalize_it : RETiRet ; }
Note: this function is NOT thread-safe!
Note : this function is NOT thread - safe!