Cast return values of sizeof() to int so they can be printed with %d.

The size of this struct is unlikely to ever grow beyond what an int
can represent.

Noticed by:	alpha tinderbox
This commit is contained in:
mike 2003-01-06 04:33:46 +00:00
parent 245822d35f
commit 6a9f30910e

View File

@ -976,7 +976,7 @@ check_ip6fw_mbuf(struct mbuf *m)
/* Check length */
if (m->m_len != sizeof(struct ip6_fw)) {
dprintf(("%s len=%d, want %d\n", err_prefix, m->m_len,
sizeof(struct ip6_fw)));
(int)sizeof(struct ip6_fw)));
return (NULL);
}
return(check_ip6fw_struct(mtod(m, struct ip6_fw *)));
@ -1193,7 +1193,7 @@ ip6_fw_ctl(int stage, struct mbuf **mm)
if (stage == IPV6_FW_DEL) {
if (m->m_len != sizeof(struct ip6_fw)) {
dprintf(("%s len=%d, want %d\n", err_prefix, m->m_len,
sizeof(struct ip6_fw)));
(int)sizeof(struct ip6_fw)));
error = EINVAL;
} else if (mtod(m, struct ip6_fw *)->fw_number == (u_short)-1) {
dprintf(("%s can't delete rule 65535\n", err_prefix));