diff -r cbde85c8c878 -r 1608018c5ff2 src/network/core/packet.c --- a/src/network/core/packet.c Wed Jan 03 20:00:29 2007 +0000 +++ b/src/network/core/packet.c Thu Jan 11 13:16:26 2007 +0000 @@ -6,8 +6,6 @@ #include "../../macros.h" #include "../../string.h" -#include "os_abstraction.h" -#include "config.h" #include "packet.h" /** @@ -24,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. */ @@ -114,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;