git: f12a9a4c041a - main - frag6: Drop unneeded casts from malloc calls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 31 Dec 2023 16:24:21 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f12a9a4c041a4dbce7dccc85aa5fad155e137d7e commit f12a9a4c041a4dbce7dccc85aa5fad155e137d7e Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-12-31 16:15:22 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-12-31 16:15:22 +0000 frag6: Drop unneeded casts from malloc calls No functional change intended. MFC after: 1 week --- 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;