diff -r 158718283d16 -r 7fdc9b423ba1 src/console.cpp --- a/src/console.cpp Thu Jan 11 15:30:35 2007 +0000 +++ b/src/console.cpp Thu Jan 11 17:29:39 2007 +0000 @@ -224,7 +224,7 @@ memset(_iconsole_history, 0, sizeof(_iconsole_history)); memset(_iconsole_buffer, 0, sizeof(_iconsole_buffer)); memset(_iconsole_cbuffer, 0, sizeof(_iconsole_cbuffer)); - CallocT(&_iconsole_cmdline.buf, ICON_CMDLN_SIZE); // create buffer and zero it + _iconsole_cmdline.buf = CallocT(ICON_CMDLN_SIZE); // create buffer and zero it _iconsole_cmdline.maxlength = ICON_CMDLN_SIZE; IConsolePrintF(13, "OpenTTD Game Console Revision 7 - %s", _openttd_revision); @@ -613,8 +613,7 @@ void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc) { char *new_cmd = strdup(name); - IConsoleCmd *item_new; - MallocT(&item_new, 1); + IConsoleCmd *item_new = MallocT(1); item_new->next = NULL; item_new->proc = proc; @@ -651,8 +650,7 @@ { char *new_alias = strdup(name); char *cmd_aliased = strdup(cmd); - IConsoleAlias *item_new; - MallocT(&item_new, 1); + IConsoleAlias *item_new = MallocT(1); item_new->next = NULL; item_new->cmdline = cmd_aliased; @@ -787,8 +785,7 @@ void IConsoleVarRegister(const char *name, void *addr, IConsoleVarTypes type, const char *help) { char *new_cmd = strdup(name); - IConsoleVar *item_new; - MallocT(&item_new, 1); + IConsoleVar *item_new = MallocT(1); item_new->help = (help != NULL) ? strdup(help) : NULL;