diff options
author | rubidium <rubidium@openttd.org> | 2007-01-04 21:48:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-04 21:48:52 +0000 |
commit | 73079f83bc99d17571e547cfcc7c2c9c6ff31217 (patch) | |
tree | 14ee5feed2ea48a5d6f3bc1965768ced6fa0dd4d /src/network/core/packet.c | |
parent | b2f85eb044df4ea47ce53115f11a113d2914df24 (diff) | |
download | openttd-73079f83bc99d17571e547cfcc7c2c9c6ff31217.tar.xz |
(svn r7836) -Codechange: some constness for network/core.
Diffstat (limited to 'src/network/core/packet.c')
-rw-r--r-- | src/network/core/packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/packet.c b/src/network/core/packet.c index aed0b6299..d75d78c7e 100644 --- a/src/network/core/packet.c +++ b/src/network/core/packet.c @@ -22,7 +22,7 @@ extern void NORETURN CDECL error(const char *str, ...); * @param type the of packet * @return the newly created packet */ -Packet *NetworkSend_Init(PacketType type) +Packet *NetworkSend_Init(const PacketType type) { Packet *packet = malloc(sizeof(Packet)); /* An error is inplace here, because it simply means we ran out of memory. */ @@ -112,7 +112,7 @@ void NetworkSend_string(Packet *packet, const char* data) extern uint CloseConnection(NetworkClientState *cs); /** Is it safe to read from the packet, i.e. didn't we run over the buffer ? */ -static inline bool CanReadFromPacket(NetworkClientState *cs, Packet *packet, uint bytes_to_read) +static inline bool CanReadFromPacket(NetworkClientState *cs, const Packet *packet, const uint bytes_to_read) { /* Don't allow reading from a closed socket */ if (HasClientQuit(cs)) return false; |