Commit 53a55da7 authored by Sergey Lyubka's avatar Sergey Lyubka

Add type cast in ns_out()

parent bf442777
...@@ -377,7 +377,8 @@ void iobuf_remove(struct iobuf *io, size_t n) { ...@@ -377,7 +377,8 @@ void iobuf_remove(struct iobuf *io, size_t n) {
static size_t ns_out(struct ns_connection *nc, const void *buf, size_t len) { static size_t ns_out(struct ns_connection *nc, const void *buf, size_t len) {
if (nc->flags & NSF_UDP) { if (nc->flags & NSF_UDP) {
long n = sendto(nc->sock, buf, len, 0, &nc->sa.sa, sizeof(nc->sa.sin)); long n = sendto(nc->sock, (const char *) buf, len, 0, &nc->sa.sa,
sizeof(nc->sa.sin));
DBG(("%p %d send %ld (%d %s)", nc, nc->sock, n, errno, strerror(errno))); DBG(("%p %d send %ld (%d %s)", nc, nc->sock, n, errno, strerror(errno)));
return n < 0 ? 0 : n; return n < 0 ? 0 : n;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment