summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-05-19 19:21:56 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-05-19 19:21:56 +0200
commit2a2ee4ef99214a87fde3233362e0ff5efb175fcf (patch)
tree11b0ffd6ea8b173d2321ecaa3b6e80ec7a9a0139
parent31078a8449aadd531dda746da1339098db13e7c0 (diff)
downloadfastd-2a2ee4ef99214a87fde3233362e0ff5efb175fcf.tar
fastd-2a2ee4ef99214a87fde3233362e0ff5efb175fcf.zip
Cast void* to char* before pointer arithmetic
-rw-r--r--src/fastd.c2
1 files changed, 1 insertions, 1 deletions
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)) {