diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-01-30 20:39:34 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-01-30 20:39:34 +0000 |
| commit | 56e1cba88bb82f2a6af0212c72182ff6303a1554 (patch) | |
| tree | d1012203d4f94cbcaf3b5d7cc3d260387f2d1f0e | |
| parent | 34c3e1d718a86436f863b2ae8b91bcf406b37f0e (diff) | |
ip6_mroute: Remove unnecessary casts
No functional change intended.
MFC after: 1 week
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
| -rw-r--r-- | sys/netinet6/ip6_mroute.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 29144f4d1acb..5a60a3ed368f 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -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); |
