menu: Fix default NULL

This commit is contained in:
Denis Pauk 2024-06-11 23:28:50 +03:00
parent 28aeb68826
commit e7dc4f3b2c
3 changed files with 12 additions and 12 deletions

View file

@ -121,7 +121,7 @@ M_ForceMenuOff(void)
Cvar_Set("paused", "0"); Cvar_Set("paused", "0");
} }
void void
M_PopMenu(void) M_PopMenu(void)
{ {
S_StartLocalSound(menu_out_sound); S_StartLocalSound(menu_out_sound);
@ -726,7 +726,7 @@ InitMainMenu(void)
static void static void
M_Main_Draw(void) M_Main_Draw(void)
{ {
menucommon_s * item = 0; menucommon_s * item = NULL;
int x = 0; int x = 0;
int y = 0; int y = 0;
@ -752,7 +752,7 @@ M_Main_Key(int key)
void void
M_Menu_Main_f(void) M_Menu_Main_f(void)
{ {
menucommon_s * item = 0; menucommon_s * item = NULL;
InitMainMenu(); InitMainMenu();
@ -5502,7 +5502,7 @@ static qboolean
PlayerDirectoryList(void) PlayerDirectoryList(void)
{ {
char* findname = "players/*"; char* findname = "players/*";
char** list = 0; char** list = NULL;
int num = 0; int num = 0;
// get a list of "players" subdirectories // get a list of "players" subdirectories
@ -5559,8 +5559,8 @@ static qboolean
PlayerModelList(void) PlayerModelList(void)
{ {
char findname[MAX_QPATH]; char findname[MAX_QPATH];
char** list = 0; char** list = NULL;
char** data = 0; char** data = NULL;
int num = 0; int num = 0;
int mdl = 0; int mdl = 0;
qboolean result = true; qboolean result = true;
@ -5588,7 +5588,7 @@ PlayerModelList(void)
strcat(findname, "/*.pcx"); strcat(findname, "/*.pcx");
// get a list of pcx files // get a list of pcx files
if ((list = FS_ListFiles2(findname, &num, 0, 0)) == 0) if ((list = FS_ListFiles2(findname, &num, 0, 0)) == NULL)
{ {
continue; continue;
} }

View file

@ -912,7 +912,7 @@ Cmd_CompleteMapCommand(char *partial)
char *pmatch[1024]; char *pmatch[1024];
qboolean partialFillContinue = true; qboolean partialFillContinue = true;
if ((mapNames = FS_ListFiles2("maps/*.bsp", &nMaps, 0, 0)) != 0) if ((mapNames = FS_ListFiles2("maps/*.bsp", &nMaps, 0, 0)) != NULL)
{ {
len = strlen(partial); len = strlen(partial);
nbMatches = 0; nbMatches = 0;

View file

@ -321,7 +321,7 @@ void SV_ListMaps_f(void)
Com_Printf("\n"); Com_Printf("\n");
if ((userMapNames = FS_ListFiles2("maps/*.bsp", &nUserMaps, 0, 0)) != 0) if ((userMapNames = FS_ListFiles2("maps/*.bsp", &nUserMaps, 0, 0)) != NULL)
{ {
for (i = 0; i < nUserMaps - 1; i++) for (i = 0; i < nUserMaps - 1; i++)
{ {