From 69736c6a8e1f6a43f16a18fc19afdeb9f5953f02 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 9 Sep 2017 14:52:05 -0700 Subject: Cast away a warning. We've already ensured that len is > 0; just cast it to u_int. --- 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 85899559..52ee7dc0 100644 --- a/pcap-netfilter-linux.c +++ b/pcap-netfilter-linux.c @@ -375,7 +375,7 @@ netfilter_send_config_msg(const pcap_t *handle, u_int16_t msg_type, int ack, u_i if (snl.nl_pid != 0 || seq_id != nlh->nlmsg_seq) /* if not from kernel or wrong sequence skip */ continue; - while ((u_int)len >= NLMSG_SPACE(0) && NLMSG_OK(nlh, len)) { + while ((u_int)len >= NLMSG_SPACE(0) && NLMSG_OK(nlh, (u_int)len)) { if (nlh->nlmsg_type == NLMSG_ERROR || (nlh->nlmsg_type == NLMSG_DONE && nlh->nlmsg_flags & NLM_F_MULTI)) { if (nlh->nlmsg_len < NLMSG_ALIGN(sizeof(struct nlmsgerr))) { errno = EBADMSG; -- cgit v1.2.3