From 2a2ee4ef99214a87fde3233362e0ff5efb175fcf Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 19 May 2013 19:21:56 +0200 Subject: Cast void* to char* before pointer arithmetic --- src/fastd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fastd.c b/src/fastd.c index e7df62d..55ab1ae 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -884,7 +884,7 @@ static void handle_tun(fastd_context_t *ctx) { static inline void handle_socket_control(fastd_context_t *ctx, struct msghdr *message, const fastd_socket_t *sock, fastd_peer_address_t *local_addr) { memset(local_addr, 0, sizeof(fastd_peer_address_t)); - const char *end = message->msg_control + message->msg_controllen; + const char *end = (char*)message->msg_control + message->msg_controllen; struct cmsghdr *cmsg; for (cmsg = CMSG_FIRSTHDR(message); cmsg; cmsg = CMSG_NXTHDR(message, cmsg)) { -- cgit v1.2.3