src/network/core/packet.c
changeset 5779 d94be8c0cf86
parent 5778 c1454e0c03bf
--- a/src/network/core/packet.c	Thu Jan 04 21:21:14 2007 +0000
+++ b/src/network/core/packet.c	Thu Jan 04 21:48:52 2007 +0000
@@ -22,7 +22,7 @@
  * @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 @@
 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;