Skip to content

Commit

Permalink
fix clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin committed Dec 18, 2024
1 parent 04b44da commit 7e21f44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/f_finale.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static boolean MapInfo_Drawer(void)
//
void F_StartFinale (void)
{
musicenum_t music_id = -1;
musicenum_t music_id = mus_None;

gameaction = ga_nothing;
gamestate = GS_FINALE;
Expand Down
12 changes: 7 additions & 5 deletions src/g_umapinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,10 @@ void G_ParseMapInfo(int lumpnum)
else
{
int ep, map;
G_ValidateMapName(parsed.mapname, &ep, &map);
strcpy(parsed.nextmap, MapName(ep, map + 1));
if (G_ValidateMapName(parsed.mapname, &ep, &map))
{
strcpy(parsed.nextmap, MapName(ep, map + 1));
}
}
}

Expand Down Expand Up @@ -673,15 +675,15 @@ boolean G_ValidateMapName(const char *mapname, int *episode, int *map)
{
if (sscanf(mapuname, "E%dM%d", &e, &m) != 2)
{
return 0;
return false;
}
strcpy(lumpname, MapName(e, m));
}
else
{
if (sscanf(mapuname, "MAP%d", &m) != 1)
{
return 0;
return false;
}
strcpy(lumpname, MapName(e = 1, m));
}
Expand All @@ -695,7 +697,7 @@ boolean G_ValidateMapName(const char *mapname, int *episode, int *map)
*map = m;
}

return !strcmp(mapuname, lumpname);
return strcmp(mapuname, lumpname) == 0;
}

boolean G_IsSecretMap(int episode, int map)
Expand Down

0 comments on commit 7e21f44

Please sign in to comment.