summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2021-02-25 02:48:22 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2021-02-25 02:48:22 +0000
commite81c643cb074547c4b994c0c0cb2026375874d3b (patch)
treea34dbd5139146f2ae75aa24fd7de3ba287bb5582 /sys/netinet/ip_icmp.c
parentcb17d84caf8abcf80d072c6fbc33a22324e06358 (diff)
we don't have to cast to caddr_t when calling m_copydata anymore.
the first cut of this diff was made with coccinelle using this spatch: @rule@ type caddr_t; expression m, off, len, cp; @@ -m_copydata(m, off, len, (caddr_t)cp) +m_copydata(m, off, len, cp) i had fix it's opinionated idea of formatting by hand though, so i'm not sure it was worth it. ok deraadt@ bluhm@
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 5deaa3822a8..a007aa6c2b3 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.184 2020/12/20 21:15:47 bluhm Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.185 2021/02/25 02:48:21 dlg Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -259,7 +259,7 @@ icmp_do_error(struct mbuf *n, int type, int code, u_int32_t dest, int destmtu)
}
icp->icmp_code = code;
- m_copydata(n, 0, icmplen, (caddr_t)&icp->icmp_ip);
+ m_copydata(n, 0, icmplen, &icp->icmp_ip);
/*
* Now, copy old ip header (without options)