ip6_mroute: Remove unnecessary casts

No functional change intended.

MFC after:	1 week
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
This commit is contained in:
Mark Johnston
2026-01-30 20:39:34 +00:00
parent 34c3e1d718
commit 56e1cba88b
+3 -4
View File
@@ -916,8 +916,7 @@ add_m6fc(struct mf6cctl *mfccp)
}
if (rt == NULL) {
/* no upcall, so make a new entry */
rt = (struct mf6c *)malloc(sizeof(*rt), M_MRTABLE6,
M_NOWAIT);
rt = malloc(sizeof(*rt), M_MRTABLE6, M_NOWAIT);
if (rt == NULL) {
MFC6_UNLOCK();
return (ENOBUFS);
@@ -1134,7 +1133,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m)
* Allocate mbufs early so that we don't do extra work if we
* are just going to fail anyway.
*/
rte = (struct rtdetq *)malloc(sizeof(*rte), M_MRTABLE6, M_NOWAIT);
rte = malloc(sizeof(*rte), M_MRTABLE6, M_NOWAIT);
if (rte == NULL) {
MFC6_UNLOCK();
return (ENOBUFS);
@@ -1168,7 +1167,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m)
struct omrt6msg *oim;
#endif
/* no upcall, so make a new entry */
rt = (struct mf6c *)malloc(sizeof(*rt), M_MRTABLE6, M_NOWAIT);
rt = malloc(sizeof(*rt), M_MRTABLE6, M_NOWAIT);
if (rt == NULL) {
free(rte, M_MRTABLE6);
m_freem(mb0);