summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/net/uhso.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2011-11-12 08:16:45 +0000
committerhselasky <hselasky@FreeBSD.org>2011-11-12 08:16:45 +0000
commita3f67b08f33f8f52dd06e9f36da9671affa61bbd (patch)
tree587db003358056e234b1079f0015b7213b7202ec /sys/dev/usb/net/uhso.c
parent3b996bbc1149552d433105f70b0d45df8873ed70 (diff)
downloadFreeBSD-src-a3f67b08f33f8f52dd06e9f36da9671affa61bbd.zip
FreeBSD-src-a3f67b08f33f8f52dd06e9f36da9671affa61bbd.tar.gz
Style change.
- Make it easier to port the USB code to other platforms by only using one set of memory functions for clearing and copying memory. None of the memory copies are overlapping. This means using bcopy() is not required. - Fix a compile warning when USB_HAVE_BUSDMA=0 - Add missing semicolon in avr32dci. - Update some comments. MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/net/uhso.c')
-rw-r--r--sys/dev/usb/net/uhso.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/net/uhso.c b/sys/dev/usb/net/uhso.c
index 8dedf4f..8211170 100644
--- a/sys/dev/usb/net/uhso.c
+++ b/sys/dev/usb/net/uhso.c
@@ -1153,7 +1153,7 @@ uhso_mux_read_callback(struct usb_xfer *xfer, usb_error_t error)
/* FALLTHROUGH */
case USB_ST_SETUP:
tr_setup:
- bzero(&req, sizeof(struct usb_device_request));
+ memset(&req, 0, sizeof(struct usb_device_request));
req.bmRequestType = UT_READ_CLASS_INTERFACE;
req.bRequest = UCDC_GET_ENCAPSULATED_RESPONSE;
USETW(req.wValue, 0);
@@ -1206,7 +1206,7 @@ uhso_mux_write_callback(struct usb_xfer *xfer, usb_error_t error)
usbd_get_page(pc, 0, &res);
- bzero(&req, sizeof(struct usb_device_request));
+ memset(&req, 0, sizeof(struct usb_device_request));
req.bmRequestType = UT_WRITE_CLASS_INTERFACE;
req.bRequest = UCDC_SEND_ENCAPSULATED_COMMAND;
USETW(req.wValue, 0);
@@ -1731,7 +1731,7 @@ uhso_if_rxflush(void *arg)
* copy the IP-packet into it.
*/
m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
- bcopy(mtod(m0, uint8_t *), mtod(m, uint8_t *), iplen);
+ memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen);
m->m_pkthdr.len = m->m_len = iplen;
/* Adjust the size of the original mbuf */
OpenPOWER on IntegriCloud