From 9a3a5bc2de63abe3af96d7d7cc984dc3fa12e112 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Tue, 19 May 2009 22:36:45 +0200 Subject: [PATCH] Make sure the send() signature is correct, buf should be const. --- src/network.c | 2 +- src/network.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network.c b/src/network.c index 0074765..e67fd3c 100644 --- a/src/network.c +++ b/src/network.c @@ -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); if (ret >= 0) diff --git a/src/network.h b/src/network.h index e51b51b..d1e179c 100644 --- a/src/network.h +++ b/src/network.h @@ -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. */ -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.