(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
This commit is contained in:
@@ -149,7 +149,7 @@ Packet *NetworkRecv_Packet(NetworkClientState *cs, NetworkRecvStatus *status)
|
||||
if (cs->socket == INVALID_SOCKET) return NULL;
|
||||
|
||||
if (cs->packet_recv == NULL) {
|
||||
MallocT(&cs->packet_recv, 1);
|
||||
cs->packet_recv = MallocT<Packet>(1);
|
||||
if (cs->packet_recv == NULL) error("Failed to allocate packet");
|
||||
/* Set pos to zero! */
|
||||
cs->packet_recv->pos = 0;
|
||||
|
Reference in New Issue
Block a user