if (length == 0)
break;
- if (length == -1)
+ if ((int)length == -1)
{
Con_Printf("Read error\n");
return -1;
while (1)
{
len = dfunc.Read (testSocket, net_message.data, net_message.maxsize, &clientaddr);
- if (len < sizeof(int))
+ if (len < (int)sizeof(int))
break;
net_message.cursize = len;
MSG_ReadLong();
if (control == -1)
break;
- if ((control & (~NETFLAG_LENGTH_MASK)) != NETFLAG_CTL)
+ if ((control & (~NETFLAG_LENGTH_MASK)) != (int)NETFLAG_CTL)
break;
if ((control & NETFLAG_LENGTH_MASK) != len)
break;
name[0] = 0;
len = dfunc.Read (test2Socket, net_message.data, net_message.maxsize, &clientaddr);
- if (len < sizeof(int))
+ if (len < (int)sizeof(int))
goto Reschedule;
net_message.cursize = len;
MSG_ReadLong();
if (control == -1)
goto Error;
- if ((control & (~NETFLAG_LENGTH_MASK)) != NETFLAG_CTL)
+ if ((control & (~NETFLAG_LENGTH_MASK)) != (int)NETFLAG_CTL)
goto Error;
if ((control & NETFLAG_LENGTH_MASK) != len)
goto Error;
SZ_Clear(&net_message);
len = dfunc.Read (acceptsock, net_message.data, net_message.maxsize, &clientaddr);
- if (len < sizeof(int))
+ if (len < (int)sizeof(int))
return NULL;
net_message.cursize = len;
MSG_BeginReading ();
control = BigLong(*((int *)net_message.data));
MSG_ReadLong();
-
+
// Messages starting by 0xFFFFFFFF are master server messages
- if (control == 0xFFFFFFFF)
+ if ((unsigned int)control == 0xFFFFFFFF)
{
int responsesize = Master_HandleMessage();
if (responsesize > 0)
}
return NULL;
}
- if ((control & (~NETFLAG_LENGTH_MASK)) != NETFLAG_CTL)
+ if ((control & (~NETFLAG_LENGTH_MASK)) != (int)NETFLAG_CTL)
return NULL;
if ((control & NETFLAG_LENGTH_MASK) != len)
return NULL;
int control;
int c, n, i;
- if (net_message.cursize < sizeof(int))
+ if (net_message.cursize < (int)sizeof(int))
return false;
// don't answer our own query
MSG_ReadLong();
if (control == -1)
return false;
- if ((control & (~NETFLAG_LENGTH_MASK)) != NETFLAG_CTL)
+ if ((control & (~NETFLAG_LENGTH_MASK)) != (int)NETFLAG_CTL)
return false;
if ((control & NETFLAG_LENGTH_MASK) != net_message.cursize)
return false;
Con_DPrintf("Datagram_SearchForInetHosts: Recv received %d byte message\n", net_message.cursize);
Master_ParseServerList (&dfunc);
}
-
+
while ((ret = dfunc.Read (dfunc.controlSock, net_message.data, net_message.maxsize, &readaddr)) > 0)
{
net_message.cursize = ret;
if (_Datagram_SearchForInetHosts (master))
result = true;
}
-
+
return result;
}
continue;
}
- if (ret < sizeof(int))
+ if (ret < (int)sizeof(int))
{
ret = 0;
continue;
ret = 0;
continue;
}
- if ((control & (~NETFLAG_LENGTH_MASK)) != NETFLAG_CTL)
+ if ((control & (~NETFLAG_LENGTH_MASK)) != (int)NETFLAG_CTL)
{
ret = 0;
continue;