1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-30 16:51:41 +00:00

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 Barcroft 2003-01-06 04:33:46 +00:00
parent e18083deb1
commit ea4c7ada01
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108765

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));