diff options
author | hselasky <hselasky@FreeBSD.org> | 2011-11-12 08:16:45 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2011-11-12 08:16:45 +0000 |
commit | a3f67b08f33f8f52dd06e9f36da9671affa61bbd (patch) | |
tree | 587db003358056e234b1079f0015b7213b7202ec /sys/dev/usb/usb_msctest.c | |
parent | 3b996bbc1149552d433105f70b0d45df8873ed70 (diff) | |
download | FreeBSD-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/usb_msctest.c')
-rw-r--r-- | sys/dev/usb/usb_msctest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 10ba169..7f33014 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -475,8 +475,8 @@ bbb_command_start(struct bbb_transfer *sc, uint8_t dir, uint8_t lun, sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; sc->cmd_len = cmd_len; - bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); - bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); + memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); + memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); |