ICU-3036 Initialize the pointers
X-SVN-Rev: 12530
This commit is contained in:
parent
41852125a3
commit
f356148d72
@ -204,9 +204,11 @@ static const UChar *fetchErrorName(UErrorCode err)
|
||||
{
|
||||
if (!gInfoMessages) {
|
||||
gInfoMessages = (UChar **)malloc((U_ERROR_WARNING_LIMIT-U_ERROR_WARNING_START)*sizeof(UChar*));
|
||||
memset(gInfoMessages, 0, (U_ERROR_WARNING_LIMIT-U_ERROR_WARNING_START)*sizeof(UChar*));
|
||||
}
|
||||
if (!gErrMessages) {
|
||||
gErrMessages = (UChar **)malloc(U_ERROR_LIMIT*sizeof(UChar*));
|
||||
memset(gErrMessages, 0, U_ERROR_LIMIT*sizeof(UChar*));
|
||||
}
|
||||
if(err>=0)
|
||||
return gErrMessages[err];
|
||||
|
Loading…
Reference in New Issue
Block a user