From e3e0404d23c2b5cca8eaa17be5ecfa876a3a53b8 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 20 Nov 2024 23:38:52 +0400 Subject: [PATCH] In net module also set buf type to void in net_send(). --- src/net.c | 2 +- src/net.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net.c b/src/net.c index a9fb7ca..bd3a9d0 100644 --- a/src/net.c +++ b/src/net.c @@ -113,7 +113,7 @@ bool net_set_timeout(net_t *const n, int usec) { return true; } -ssize_t net_send(const net_t *const n, const char *const buf, const size_t buf_len) { +ssize_t net_send(const net_t *const n, const void *const buf, const size_t buf_len) { if (n->fd == -1 || n->raddr.sa_family == AF_UNSPEC) return -1; diff --git a/src/net.h b/src/net.h index 1ee9207..422f0db 100644 --- a/src/net.h +++ b/src/net.h @@ -16,7 +16,7 @@ void net_destroy(net_t *n); bool net_set_timeout(net_t *const n, int usec); -ssize_t net_send(const net_t *const n, const char *const buf, const size_t buf_len); +ssize_t net_send(const net_t *const n, const void *const buf, const size_t buf_len); ssize_t net_recv(net_t *const n, void *const buf, const size_t buf_len); #endif /* _NET_H_ */