diff options
author | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
commit | 33be1ecfb1a9056b027d50d7b558cff87c5b744d (patch) | |
tree | d644a3831ca0947198b191fa3e4e8973d3a9786e /src/network/core/packet.cpp | |
parent | 91ff74641060445dc1647bbf05baeb03b45c3099 (diff) | |
download | openttd-33be1ecfb1a9056b027d50d7b558cff87c5b744d.tar.xz |
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
Diffstat (limited to 'src/network/core/packet.cpp')
-rw-r--r-- | src/network/core/packet.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<Packet>(1); /* An error is inplace here, because it simply means we ran out of memory. */ if (packet == NULL) error("Failed to allocate Packet"); |