CVS patchset: 2037
CVS date: 1998/03/11 23:28:47
static void expandMacroTable(struct MacroContext *mc)
{
mc->macrosAllocated += MACRO_CHUNK_SIZE;
- mc->macroTable = realloc(mc->macroTable, sizeof(*(mc->macroTable)) *
- mc->macrosAllocated);
+ if (mc->macroTable) {
+ mc->macroTable = realloc(mc->macroTable, sizeof(*(mc->macroTable)) *
+ mc->macrosAllocated);
+ } else {
+ mc->macroTable = malloc(sizeof(*(mc->macroTable)) *
+ mc->macrosAllocated);
+ }
}
/***********************************************************************/