Use malloc/strdup instead of Alloc.

This commit is contained in:
Reece H. Dunn
2016-01-18 20:34:59 +00:00
parent 325014da42
commit bbd981efb8
5 changed files with 7 additions and 21 deletions
+1 -2
View File
@@ -220,8 +220,7 @@ static Translator *NewTranslator(void)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 56, 0, 57, 0, // 0x170
};
tr = (Translator *)Alloc(sizeof(Translator));
if (tr == NULL)
if ((tr = (Translator *)malloc(sizeof(Translator))) == NULL)
return NULL;
tr->charset_a0 = charsets[1]; // ISO-8859-1, this is for when the input is not utf8