mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-14 20:25:08 +02:00
Cast void* to char* before pointer arithmetic
This commit is contained in:
parent
31078a8449
commit
2a2ee4ef99
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
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));
|
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;
|
struct cmsghdr *cmsg;
|
||||||
for (cmsg = CMSG_FIRSTHDR(message); cmsg; cmsg = CMSG_NXTHDR(message, cmsg)) {
|
for (cmsg = CMSG_FIRSTHDR(message); cmsg; cmsg = CMSG_NXTHDR(message, cmsg)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue