(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:
@@ -26,8 +26,7 @@ extern void NORETURN CDECL error(const char *str, ...);
|
||||
*/
|
||||
Packet *NetworkSend_Init(const PacketType type)
|
||||
{
|
||||
Packet *packet;
|
||||
MallocT(&packet, 1);
|
||||
Packet *packet = MallocT<Packet>(1);
|
||||
/* An error is inplace here, because it simply means we ran out of memory. */
|
||||
if (packet == NULL) error("Failed to allocate Packet");
|
||||
|
||||
|
Reference in New Issue
Block a user