Make sure the send() signature is correct, buf should be const.

This commit is contained in:
Jan Vidar Krey 2009-05-19 22:36:45 +02:00
parent e382e24337
commit 9a3a5bc2de
2 changed files with 2 additions and 2 deletions

View File

@ -547,7 +547,7 @@ ssize_t net_recv(int fd, void* buf, size_t len, int flags)
} }
ssize_t net_send(int fd, void* buf, size_t len, int flags) ssize_t net_send(int fd, const void* buf, size_t len, int flags)
{ {
ssize_t ret = send(fd, buf, len, flags); ssize_t ret = send(fd, buf, len, flags);
if (ret >= 0) if (ret >= 0)

View File

@ -163,7 +163,7 @@ extern ssize_t net_recv(int fd, void* buf, size_t len, int flags);
/** /**
* A wrapper for the send() function call. * A wrapper for the send() function call.
*/ */
extern ssize_t net_send(int fd, void* buf, size_t len, int flags); extern ssize_t net_send(int fd, const void* buf, size_t len, int flags);
/** /**
* This tries to create a AF_INET6 socket. * This tries to create a AF_INET6 socket.