summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-08-04 08:54:18 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-08-04 08:54:18 (GMT)
commitdd2853ea8cf97b773ba362da50d06d4abc608a09 (patch)
tree1aade30c8d2f10d606daf841da4590dc48aea188
parentb8c868d42b0788bc6e41f3e8368d507f0d338687 (diff)
Fixed the prototype for receiving data from network.
-rw-r--r--src/common/io.c4
-rw-r--r--src/common/io.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/io.c b/src/common/io.c
index cfc6b80..2a68649 100644
--- a/src/common/io.c
+++ b/src/common/io.c
@@ -212,13 +212,13 @@ bool safe_write(int fd, const void *buf, size_t count)
* *
******************************************************************************/
-bool safe_recv(int sockfd, const void *buf, size_t len, int flags)
+bool safe_recv(int sockfd, void *buf, size_t len, int flags)
{
uint8_t *iter; /* Données en attente */
size_t remaining; /* Quantité restante */
ssize_t got; /* Données envoyées */
- iter = (uint8_t *)buf;
+ iter = buf;
remaining = len;
while (remaining > 0)
diff --git a/src/common/io.h b/src/common/io.h
index b4e2211..3639d98 100644
--- a/src/common/io.h
+++ b/src/common/io.h
@@ -42,7 +42,7 @@ ssize_t safe_read_partial(int, void *, size_t);
bool safe_write(int, const void *, size_t);
/* Réceptionne des données depuis un flux réseau. */
-bool safe_recv(int, const void *, size_t, int);
+bool safe_recv(int, void *, size_t, int);
/* Envoie des données au travers un flux réseau. */
bool safe_send(int, const void *, size_t, int);