shithub: choc

Download patch

ref: 52d99f42430a2c3faec4ac0bb824a691605b98f7
parent: d6ee8cc99d2a6012f248da2c847e05222846686b
author: Jonathan Dowland <jon@dow.land>
date: Thu Feb 28 22:12:51 EST 2019

remove redundant else blocks

As Simon points out, they are not needed; since if M_StringJoin
fails it will terminate the program.

--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1216,9 +1216,6 @@
     {
         net_player_name = NET_GetRandomPetName();
     }
-
-    if (net_player_name == NULL)
-        net_player_name = "Player";
 }
 
 void NET_Init(void)
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -1100,11 +1100,6 @@
     {
         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)