Add type cast in ns_out()

This commit is contained in:
Sergey Lyubka committed 2015-02-16 18:19:15 +00:00
1 parent bf44277764
commit 53a55da7bc
1 file changed
+2 -1
+2 -1
View File
@@ -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) {
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)));
return n < 0 ? 0 : n;
} else {