git: 213077d6e404 - stable/14 - frag6: Drop unneeded casts from malloc calls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 Jan 2024 16:58:07 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=213077d6e40446090f8055d5d92f18808adc0819
commit 213077d6e40446090f8055d5d92f18808adc0819
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-31 16:15:22 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-07 16:55:32 +0000
frag6: Drop unneeded casts from malloc calls
No functional change intended.
MFC after: 1 week
(cherry picked from commit f12a9a4c041a4dbce7dccc85aa5fad155e137d7e)
---
sys/netinet6/frag6.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 82d4239777da..a3a6e7eca14a 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -588,8 +588,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
goto dropfrag;
/* Allocate IPv6 fragement packet queue entry. */
- q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FRAG6,
- M_NOWAIT | M_ZERO);
+ q6 = malloc(sizeof(struct ip6q), M_FRAG6, M_NOWAIT | M_ZERO);
if (q6 == NULL)
goto dropfrag;
#ifdef MAC
@@ -715,8 +714,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
}
/* Allocate an IPv6 fragement queue entry for this fragmented part. */
- ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FRAG6,
- M_NOWAIT | M_ZERO);
+ ip6af = malloc(sizeof(struct ip6asfrag), M_FRAG6, M_NOWAIT | M_ZERO);
if (ip6af == NULL)
goto dropfrag;
ip6af->ip6af_mff = (ip6f->ip6f_offlg & IP6F_MORE_FRAG) ? true : false;