diff options
author | smatz <smatz@openttd.org> | 2009-10-09 11:03:00 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-10-09 11:03:00 +0000 |
commit | eb72a0095f39b4160be837b4e6b5758f5240efd9 (patch) | |
tree | 70f67e84529efde011bbf53eb7b33cd27fd18a19 /src/network/core/tcp.cpp | |
parent | cbc6af2506b84e8c0736073af5f7e6f3719b3500 (diff) | |
download | openttd-eb72a0095f39b4160be837b4e6b5758f5240efd9.tar.xz |
(svn r17746) -Codechange: 'operator new' doesn't return NULL, NetworkSend_Init() is useless
Diffstat (limited to 'src/network/core/tcp.cpp')
-rw-r--r-- | src/network/core/tcp.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index b30e4e526..c3a7733e3 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -134,16 +134,14 @@ bool NetworkTCPSocketHandler::Send_Packets() Packet *NetworkTCPSocketHandler::Recv_Packet() { ssize_t res; - Packet *p; if (!this->IsConnected()) return NULL; if (this->packet_recv == NULL) { this->packet_recv = new Packet(this); - if (this->packet_recv == NULL) error("Failed to allocate packet"); } - p = this->packet_recv; + Packet *p = this->packet_recv; /* Read packet size */ if (p->pos < sizeof(PacketSize)) { |