From b0f028907bac3a1b4cbabd0faade2a72e0753ee8 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 9 Aug 2015 16:01:40 -0700 Subject: Make the buffer member of a pcap_t a void *. Yes, in some sense, it's an array of bytes - on modern processors, *all* data is ultimately an array of bytes - but different modules will use it in different ways, not all of which will be an undifferentiated array of bytes. This squelches a complaint from the Clang static analyzer. Clean up some code while we're at it. --- pcap-netfilter-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pcap-netfilter-linux.c') diff --git a/pcap-netfilter-linux.c b/pcap-netfilter-linux.c index 3ee6faa3..4dda9a79 100644 --- a/pcap-netfilter-linux.c +++ b/pcap-netfilter-linux.c @@ -105,7 +105,7 @@ netfilter_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_c return -1; } - buf = handle->buffer; + buf = (unsigned char *)handle->buffer; while (len >= NLMSG_SPACE(0)) { const struct nlmsghdr *nlh = (const struct nlmsghdr *) buf; u_int32_t msg_len; -- cgit v1.2.3