From 33be1ecfb1a9056b027d50d7b558cff87c5b744d Mon Sep 17 00:00:00 2001 From: KUDr Date: Thu, 11 Jan 2007 17:29:39 +0000 Subject: (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter --- src/network/core/packet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/network/core/packet.cpp') diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 38d00d8c0..511e0c675 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -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(1); /* An error is inplace here, because it simply means we ran out of memory. */ if (packet == NULL) error("Failed to allocate Packet"); -- cgit v1.2.3-54-g00ecf