Fix always evaluates true warning

This commit is contained in:
James R 2022-06-11 16:49:36 -07:00
parent 92c81baf58
commit 3b4bb8aea1
3 changed files with 5 additions and 5 deletions

View file

@ -2185,9 +2185,9 @@ void M_DrawMPJoinIP(void)
if (currentMenu->numitems - i <= NUMLOGIP)
{
UINT8 index = NUMLOGIP - (currentMenu->numitems - i);
if (joinedIPlist[index][1] && strlen(joinedIPlist[index][1])) // Try drawing server name
if (strlen(joinedIPlist[index][1])) // Try drawing server name
strcpy(str, joinedIPlist[index][1]);
else if (joinedIPlist[index][0] && strlen(joinedIPlist[index][0])) // If that fails, get the address
else if (strlen(joinedIPlist[index][0])) // If that fails, get the address
strcpy(str, joinedIPlist[index][0]);
else
strcpy(str, "---"); // If that fails too then there's nothing!

View file

@ -3796,7 +3796,7 @@ boolean M_JoinIPInputs(INT32 ch)
M_SetMenuDelay(pid);
// Is there an address at this part of the table?
if (joinedIPlist[index][0] && strlen(joinedIPlist[index][0]))
if (strlen(joinedIPlist[index][0]))
M_JoinIP(joinedIPlist[index][0]);
else
S_StartSound(NULL, sfx_lose);

View file

@ -504,7 +504,7 @@ void M_SaveJoinedIPs(void)
UINT8 i;
char *filepath;
if (!joinedIPlist[0][0] || !strlen(joinedIPlist[0][0]))
if (!strlen(joinedIPlist[0][0]))
return; // Don't bother, there's nothing to save.
// append srb2home to beginning of filename
@ -521,7 +521,7 @@ void M_SaveJoinedIPs(void)
for (i=0; i < NUMLOGIP; i++)
{
if (joinedIPlist[i][0] && strlen(joinedIPlist[i][0]))
if (strlen(joinedIPlist[i][0]))
{
char savestring[MAXSTRINGLENGTH];
strcpy(savestring, joinedIPlist[i][0]);