From 33be1ecfb1a9056b027d50d7b558cff87c5b744d Mon Sep 17 00:00:00 2001 From: KUDr Date: Thu, 11 Jan 2007 17:29:39 +0000 Subject: (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter --- src/fios.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fios.cpp') diff --git a/src/fios.cpp b/src/fios.cpp index 87e7ea93d..a833426a3 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -48,7 +48,7 @@ FiosItem *FiosAlloc(void) { if (_fios_count == _fios_alloc) { _fios_alloc += 256; - ReallocT(&_fios_items, _fios_alloc); + _fios_items = ReallocT(_fios_items, _fios_alloc); } return &_fios_items[_fios_count++]; } @@ -324,7 +324,7 @@ FiosItem *FiosGetSavegameList(int mode) static char *_fios_save_path = NULL; if (_fios_save_path == NULL) { - MallocT(&_fios_save_path, MAX_PATH); + _fios_save_path = MallocT(MAX_PATH); ttd_strlcpy(_fios_save_path, _paths.save_dir, MAX_PATH); } @@ -372,7 +372,7 @@ FiosItem *FiosGetScenarioList(int mode) static char *_fios_scn_path = NULL; if (_fios_scn_path == NULL) { - MallocT(&_fios_scn_path, MAX_PATH); + _fios_scn_path = MallocT(MAX_PATH); ttd_strlcpy(_fios_scn_path, _paths.scenario_dir, MAX_PATH); } @@ -403,7 +403,7 @@ FiosItem *FiosGetHeightmapList(int mode) static char *_fios_hmap_path = NULL; if (_fios_hmap_path == NULL) { - MallocT(&_fios_hmap_path, MAX_PATH); + _fios_hmap_path = MallocT(MAX_PATH); strcpy(_fios_hmap_path, _paths.heightmap_dir); } -- cgit v1.2.3-54-g00ecf