summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_uath.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2021-02-25 02:48:19 +0000
committerdlg <dlg@openbsd.org>2021-02-25 02:48:19 +0000
commit5c7fed39bd376c774afa6b5ea3c41fd50de48416 (patch)
tree545f293afa31dc5fd22bd212fb767e1a9dfdb082 /sys/dev/usb/if_uath.c
parentlet m_copydata use a void * instead of caddr_t (diff)
downloadwireguard-openbsd-5c7fed39bd376c774afa6b5ea3c41fd50de48416.tar.xz
wireguard-openbsd-5c7fed39bd376c774afa6b5ea3c41fd50de48416.zip
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/dev/usb/if_uath.c')
-rw-r--r--sys/dev/usb/if_uath.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index e75546ba901..ae8ccb49c76 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.86 2020/12/12 11:48:54 jan Exp $ */
+/* $OpenBSD: if_uath.c,v 1.87 2021/02/25 02:48:20 dlg Exp $ */
/*-
* Copyright (c) 2006
@@ -1398,14 +1398,14 @@ uath_tx_data(struct uath_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
*frm++ = (iv >> 16) & 0xff;
*frm++ = ic->ic_wep_txkey << 6;
- m_copydata(m0, sizeof (struct ieee80211_frame),
- m0->m_pkthdr.len - sizeof (struct ieee80211_frame), frm);
+ m_copydata(m0, sizeof(struct ieee80211_frame),
+ m0->m_pkthdr.len - sizeof(struct ieee80211_frame), frm);
paylen += IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN;
xferlen += IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN;
totlen = xferlen + IEEE80211_WEP_CRCLEN;
} else {
- m_copydata(m0, 0, m0->m_pkthdr.len, (uint8_t *)(desc + 1));
+ m_copydata(m0, 0, m0->m_pkthdr.len, desc + 1);
totlen = xferlen;
}