netlink: fix casts

Reviewed by:	melifaro
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44088

(cherry picked from commit 48f33b55b0148c3c8991e53156f37c42b8bc22e9)
This commit is contained in:
Kristof Provost 2024-02-26 11:18:30 +01:00
parent fc31d474c4
commit 14bbf09433

View file

@ -321,7 +321,7 @@ nlattr_get_uint8(struct nlattr *nla, struct nl_pstate *npt, const void *arg, voi
nla->nla_type, NLA_DATA_LEN(nla));
return (EINVAL);
}
*((uint16_t *)target) = *((const uint16_t *)NL_RTA_DATA_CONST(nla));
*((uint8_t *)target) = *((const uint8_t *)NL_RTA_DATA_CONST(nla));
return (0);
}