Moving upwards definition of MEM_K so it's not restricted to \!NDEBUG; Initialized **i in list_dir_el properly to silence gcc when compiling

This commit is contained in:
zicodxx 2010-08-27 15:43:24 +00:00
parent 55871bba3e
commit aff0187d79
3 changed files with 4 additions and 3 deletions

View file

@ -3,6 +3,7 @@ D2X-Rebirth Changelog
20100827
--------
arch/include/jukebox.h, arch/sdl/jukebox.c, include/u_mem.h, main/menu.c: Add path browsing feature to make song file/directory selection easier
include/u_mem.h, main/menu.c: Moving upwards definition of MEM_K so it's not restricted to !NDEBUG; Initialized **i in list_dir_el properly to silence gcc when compiling
20100825
--------

View file

@ -18,6 +18,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
void mem_init(void);
#define MEM_K 1.5 // Dynamic array growth factor
#if !defined(NDEBUG)
void mem_display_blocks();
@ -26,8 +28,6 @@ extern void * mem_realloc( void * buffer, unsigned int size, char * var, char *
extern void mem_free( void * buffer );
extern char * mem_strdup(char * str, char * var, char * file, int line );
#define MEM_K 1.5 // Dynamic array growth factor
/* DPH: Changed malloc, etc. to d_malloc. Overloading system calls is very evil and error prone */
#define d_malloc(size) mem_malloc((size),"Unknown", __FILE__,__LINE__, 0 )
#define d_calloc(n,size) mem_malloc((n*size),"Unknown", __FILE__,__LINE__, 1 )

View file

@ -1197,7 +1197,7 @@ void searchpath_matches(browser *b, const char *str)
void list_dir_el(browser *b, const char *origdir, const char *fname)
{
char *ext;
char **i;
char **i = NULL;
ext = strrchr(fname, '.');
if (ext)