Skip to content

Commit

Permalink
remove redundant else blocks
Browse files Browse the repository at this point in the history
As Simon points out, they are not needed; since if M_StringJoin
fails it will terminate the program.
  • Loading branch information
jmtd committed Mar 1, 2019
1 parent d6ee8cc commit 52d99f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/net_client.c
Expand Up @@ -1216,9 +1216,6 @@ void NET_CL_Init(void)
{
net_player_name = NET_GetRandomPetName();
}

if (net_player_name == NULL)
net_player_name = "Player";
}

void NET_Init(void)
Expand Down
5 changes: 0 additions & 5 deletions src/setup/multiplayer.c
Expand Up @@ -1100,11 +1100,6 @@ void SetPlayerNameDefault(void)
{
net_player_name = NET_GetRandomPetName();
}

if (net_player_name == NULL)
{
net_player_name = M_StringDuplicate("player");
}
}

void MultiplayerConfig(TXT_UNCAST_ARG(widget), void *user_data)
Expand Down

0 comments on commit 52d99f4

Please sign in to comment.