From 253a97662d2eaf2043ddd5c70c1722234cb614c7 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Fri, 26 Oct 2018 13:07:37 -0400 Subject: [PATCH] sockd: Preserve a const qualifier. --- src/sockd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sockd.c b/src/sockd.c index ab2a066..3a0d321 100644 --- a/src/sockd.c +++ b/src/sockd.c @@ -299,7 +299,7 @@ static int create_raw_listen_socket(bool *using_bpf) }; static const struct sock_fprog sfp_dhcp = { .len = sizeof sf_dhcp / sizeof sf_dhcp[0], - .filter = (struct sock_filter *)sf_dhcp, + .filter = (struct sock_filter const * const)sf_dhcp, }; struct sockaddr_ll sa = { .sll_family = AF_PACKET, @@ -342,7 +342,7 @@ static bool arp_set_bpf_basic(int fd) }; static const struct sock_fprog sfp_arp = { .len = sizeof sf_arp / sizeof sf_arp[0], - .filter = (struct sock_filter *)sf_arp, + .filter = (struct sock_filter const * const)sf_arp, }; int ret = setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &sfp_arp, sizeof sfp_arp) != -1;