Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Replace b{zero, copy} with mem{set, cpy}
details: https://anonhg.NetBSD.org/src/rev/0a40c191fb9d
branches: nick-nhusb
changeset: 334140:0a40c191fb9d
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Mar 08 13:34:44 2015 +0000
description:
Replace b{zero,copy} with mem{set,cpy}
diffstat:
sys/dev/usb/if_urtw.c | 6 +++---
sys/dev/usb/if_zyd.c | 10 +++++-----
sys/dev/usb/moscom.c | 6 +++---
sys/dev/usb/uthum.c | 10 +++++-----
4 files changed, 16 insertions(+), 16 deletions(-)
diffs (141 lines):
diff -r ae6ae710a337 -r 0a40c191fb9d sys/dev/usb/if_urtw.c
--- a/sys/dev/usb/if_urtw.c Sat Mar 07 22:15:50 2015 +0000
+++ b/sys/dev/usb/if_urtw.c Sun Mar 08 13:34:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urtw.c,v 1.6.6.5 2014/12/23 11:24:32 skrll Exp $ */
+/* $NetBSD: if_urtw.c,v 1.6.6.6 2015/03/08 13:34:44 skrll Exp $ */
/* $OpenBSD: if_urtw.c,v 1.39 2011/07/03 15:47:17 matthew Exp $ */
/*-
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.6.6.5 2014/12/23 11:24:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.6.6.6 2015/03/08 13:34:44 skrll Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -2627,7 +2627,7 @@
data = &sc->sc_tx_data[sc->sc_txidx];
sc->sc_txidx = (sc->sc_txidx + 1) % URTW_TX_DATA_LIST_COUNT;
- bzero(data->buf, URTW_TX_MAXSIZE);
+ memset(data->buf, 0, URTW_TX_MAXSIZE);
data->buf[0] = m0->m_pkthdr.len & 0xff;
data->buf[1] = (m0->m_pkthdr.len & 0x0f00) >> 8;
data->buf[1] |= (1 << 7);
diff -r ae6ae710a337 -r 0a40c191fb9d sys/dev/usb/if_zyd.c
--- a/sys/dev/usb/if_zyd.c Sat Mar 07 22:15:50 2015 +0000
+++ b/sys/dev/usb/if_zyd.c Sun Mar 08 13:34:44 2015 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */
-/* $NetBSD: if_zyd.c,v 1.36.14.2 2014/12/03 14:18:07 skrll Exp $ */
+/* $NetBSD: if_zyd.c,v 1.36.14.3 2015/03/08 13:34:44 skrll Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.36.14.2 2014/12/03 14:18:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.36.14.3 2015/03/08 13:34:44 skrll Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -807,7 +807,7 @@
return ENOMEM;
cmd.code = htole16(code);
- bcopy(idata, cmd.data, ilen);
+ memcpy(cmd.data, idata, ilen);
xferflags = USBD_FORCE_SHORT_XFER;
if (!(flags & ZYD_CMD_FLAG_READ))
@@ -1893,7 +1893,7 @@
continue;
/* copy answer into caller-supplied buffer */
- bcopy(cmd->data, rqp->odata,
+ memcpy(rqp->odata, cmd->data,
sizeof(struct zyd_pair) * rqp->len);
wakeup(rqp->odata); /* wakeup caller */
@@ -1960,7 +1960,7 @@
}
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = rlen;
- bcopy((const uint8_t *)(plcp + 1), mtod(m, uint8_t *), rlen);
+ memcpy(mtod(m, uint8_t *), (const uint8_t *)(plcp + 1), rlen);
s = splnet();
diff -r ae6ae710a337 -r 0a40c191fb9d sys/dev/usb/moscom.c
--- a/sys/dev/usb/moscom.c Sat Mar 07 22:15:50 2015 +0000
+++ b/sys/dev/usb/moscom.c Sun Mar 08 13:34:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: moscom.c,v 1.8.14.3 2014/12/23 11:24:32 skrll Exp $ */
+/* $NetBSD: moscom.c,v 1.8.14.4 2015/03/08 13:34:44 skrll Exp $ */
/* $OpenBSD: moscom.c,v 1.11 2007/10/11 18:33:14 deraadt Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.8.14.3 2014/12/23 11:24:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.8.14.4 2015/03/08 13:34:44 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -213,7 +213,7 @@
sc->sc_dev = self;
- bzero(&uca, sizeof(uca));
+ memset(&uca, 0, sizeof(uca));
sc->sc_udev = uaa->device;
if (usbd_set_config_index(sc->sc_udev, MOSCOM_CONFIG_NO, 1) != 0) {
diff -r ae6ae710a337 -r 0a40c191fb9d sys/dev/usb/uthum.c
--- a/sys/dev/usb/uthum.c Sat Mar 07 22:15:50 2015 +0000
+++ b/sys/dev/usb/uthum.c Sun Mar 08 13:34:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uthum.c,v 1.10.14.2 2014/12/23 11:24:32 skrll Exp $ */
+/* $NetBSD: uthum.c,v 1.10.14.3 2015/03/08 13:34:44 skrll Exp $ */
/* $OpenBSD: uthum.c,v 1.6 2010/01/03 18:43:02 deraadt Exp $ */
/*
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.10.14.2 2014/12/23 11:24:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.10.14.3 2015/03/08 13:34:44 skrll Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -263,19 +263,19 @@
return 0;
/* issue query */
- bzero(cmdbuf, sizeof(cmdbuf));
+ memset(cmdbuf, 0, sizeof(cmdbuf));
memcpy(cmdbuf, cmd_start, sizeof(cmd_start));
if (uhidev_set_report(&sc->sc_hdev, UHID_OUTPUT_REPORT,
cmdbuf, sc->sc_olen))
return EIO;
- bzero(cmdbuf, sizeof(cmdbuf));
+ memset(cmdbuf, 0, sizeof(cmdbuf));
cmdbuf[0] = target_cmd;
if (uhidev_set_report(&sc->sc_hdev, UHID_OUTPUT_REPORT,
cmdbuf, sc->sc_olen))
return EIO;
- bzero(cmdbuf, sizeof(cmdbuf));
+ memset(cmdbuf, 0, sizeof(cmdbuf));
for (i = 0; i < 7; i++) {
if (uhidev_set_report(&sc->sc_hdev, UHID_OUTPUT_REPORT,
cmdbuf, sc->sc_olen))
Home |
Main Index |
Thread Index |
Old Index