diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-09 14:52:05 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-09 14:52:05 -0700 |
commit | 69736c6a8e1f6a43f16a18fc19afdeb9f5953f02 (patch) | |
tree | c59429fa7d445235a0450f15438276456b6f941a /pcap-netfilter-linux.c | |
parent | 7a16959acf3c4cafff538f02701966fda0cdfa77 (diff) |
Cast away a warning.
We've already ensured that len is > 0; just cast it to u_int.
Diffstat (limited to 'pcap-netfilter-linux.c')
-rw-r--r-- | pcap-netfilter-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |