diff options
author | M. Kristall <mkpdev@gmail.com> | 2012-07-12 02:46:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:18:16 +0000 |
commit | 8d448680f5b3bcd2a67a3684308bb948e4d3ddad (patch) | |
tree | 8ec357b00c06d7b2e851680270690ad8e5ee3504 /src/ui/ui_main.c | |
parent | 156289dcdd27a31e77afb36147d456bac9be72a3 (diff) |
* (bug 5000) refactor: use ARRAY_LEN; remove undefined functions; more size_t
(/dev/humancontroller)
Diffstat (limited to 'src/ui/ui_main.c')
-rw-r--r-- | src/ui/ui_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 8edcccae..eb96c4c5 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -49,7 +49,7 @@ static const char *netSources[ ] = "Favorites" }; -static const int numNetSources = sizeof( netSources ) / sizeof( const char* ); +static const size_t numNetSources = ARRAY_LEN( netSources ); static const char *netnames[ ] = { @@ -127,7 +127,7 @@ static cvarTable_t cvarTable[ ] = { &ui_chatCommands, "ui_chatCommands", "1", CVAR_ARCHIVE } }; -static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] ); +static size_t cvarTableSize = ARRAY_LEN( cvarTable ); /* ================ @@ -2689,11 +2689,11 @@ static void UI_LoadDemos( void ) char *demoname; int i, len; - Com_sprintf( demoExt, sizeof( demoExt ), "dm_%d", ( int )trap_Cvar_VariableValue( "protocol" ) ); + Com_sprintf( demoExt, sizeof( demoExt ), "%s%d", DEMOEXT, (int)trap_Cvar_VariableValue( "protocol" ) ); uiInfo.demoCount = trap_FS_GetFileList( "demos", demoExt, demolist, 4096 ); - Com_sprintf( demoExt, sizeof( demoExt ), ".dm_%d", ( int )trap_Cvar_VariableValue( "protocol" ) ); + Com_sprintf( demoExt, sizeof( demoExt ), ".%s%d", DEMOEXT, (int)trap_Cvar_VariableValue( "protocol" ) ); if( uiInfo.demoCount ) { |