aboutsummaryrefslogtreecommitdiff
path: root/pcap-netfilter-linux.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-08-09 16:01:40 -0700
committerGuy Harris <guy@alum.mit.edu>2015-08-09 16:01:40 -0700
commitb0f028907bac3a1b4cbabd0faade2a72e0753ee8 (patch)
treedf1ca401e612221337b0fd62b569b471cd95b15c /pcap-netfilter-linux.c
parent4ad986a1659485b72b4c7bdb7ceba6e8c527c217 (diff)
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.
Diffstat (limited to 'pcap-netfilter-linux.c')
-rw-r--r--pcap-netfilter-linux.c2
1 files changed, 1 insertions, 1 deletions
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;