From 94418f4f7faa651d7746bf5b858880845f8cc611 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 21 Jan 2012 11:27:02 +0800 Subject: [PATCH] Modules/IPStack - Fixed compile warning --- Modules/IPStack/udp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/IPStack/udp.c b/Modules/IPStack/udp.c index 7228f170..2cf76926 100644 --- a/Modules/IPStack/udp.c +++ b/Modules/IPStack/udp.c @@ -12,7 +12,7 @@ void UDP_Initialise(); void UDP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer); void UDP_Unreachable(tInterface *Interface, int Code, void *Address, int Length, void *Buffer); -void UDP_SendPacketTo(tUDPChannel *Channel, int AddrType, void *Address, Uint16 Port, void *Data, size_t Length); +void UDP_SendPacketTo(tUDPChannel *Channel, int AddrType, const void *Address, Uint16 Port, const void *Data, size_t Length); // --- Client Channels tVFS_Node *UDP_Channel_Init(tInterface *Interface); Uint64 UDP_Channel_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); @@ -141,7 +141,7 @@ void UDP_Unreachable(tInterface *Interface, int Code, void *Address, int Length, * \param Data Packet data * \param Length Length in bytes of packet data */ -void UDP_SendPacketTo(tUDPChannel *Channel, int AddrType, void *Address, Uint16 Port, void *Data, size_t Length) +void UDP_SendPacketTo(tUDPChannel *Channel, int AddrType, const void *Address, Uint16 Port, const void *Data, size_t Length) { tUDPHeader *hdr; @@ -250,15 +250,15 @@ Uint64 UDP_Channel_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buf Uint64 UDP_Channel_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer) { tUDPChannel *chan = Node->ImplPtr; - tUDPEndpoint *ep; - void *data; + const tUDPEndpoint *ep; + const void *data; int ofs; if(chan->LocalPort == 0) return 0; ep = Buffer; ofs = 2 + 2 + IPStack_GetAddressSize( ep->AddrType ); - data = (char*)Buffer + ofs; + data = (const char *)Buffer + ofs; UDP_SendPacketTo(chan, ep->AddrType, &ep->Addr, ep->Port, data, (size_t)Length - ofs); -- 2.20.1