summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-10-17 02:05:07 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-10-17 02:05:07 +0000
commitcc7d3bdde1846de549aedbb4286961a08087f319 (patch)
tree6e81f826720fe96fb7b708e047e2d069b4d67ddc
parent92cc59ede83976bea3809cff76e08dd099531f8f (diff)
convert old b functions to mem functions
-rw-r--r--sys/dev/vnd.c10
-rw-r--r--sys/dev/vscsi.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index c59acc44d1c..d266f81e05c 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.153 2014/07/12 18:48:51 tedu Exp $ */
+/* $OpenBSD: vnd.c,v 1.154 2014/10/17 02:05:06 tedu Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -123,8 +123,8 @@ vndencrypt(struct vnd_softc *sc, caddr_t addr, size_t size, daddr_t off,
bsize = dbtob(1);
for (i = 0; i < size/bsize; i++) {
- bzero(iv, sizeof(iv));
- bcopy(&off, iv, sizeof(off));
+ memset(iv, 0, sizeof(iv));
+ memcpy(iv, &off, sizeof(off));
blf_ecb_encrypt(sc->sc_keyctx, iv, sizeof(iv));
if (encrypt)
blf_cbc_encrypt(sc->sc_keyctx, iv, addr, bsize);
@@ -214,7 +214,7 @@ int
vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp,
int spoofonly)
{
- bzero(lp, sizeof(struct disklabel));
+ memset(lp, 0, sizeof(struct disklabel));
lp->d_secsize = sc->sc_secsize;
lp->d_nsectors = sc->sc_nsectors;
@@ -671,7 +671,7 @@ vndclear(struct vnd_softc *sc)
sc->sc_vp = NULL;
sc->sc_cred = NULL;
sc->sc_size = 0;
- bzero(sc->sc_file, sizeof(sc->sc_file));
+ memset(sc->sc_file, 0, sizeof(sc->sc_file));
}
daddr_t
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c
index d98615abcda..9e6f8de5c5b 100644
--- a/sys/dev/vscsi.c
+++ b/sys/dev/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.33 2014/10/10 09:50:32 jmatthew Exp $ */
+/* $OpenBSD: vscsi.c,v 1.34 2014/10/17 02:05:06 tedu Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
@@ -156,7 +156,7 @@ vscsi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.openings = 16;
sc->sc_link.pool = &sc->sc_iopool;
- bzero(&saa, sizeof(saa));
+ memset(&saa, 0, sizeof(saa));
saa.saa_sc_link = &sc->sc_link;
sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev,
@@ -356,7 +356,7 @@ vscsi_i2t(struct vscsi_softc *sc, struct vscsi_ioc_i2t *i2t)
i2t->tag = ccb->ccb_tag;
i2t->target = link->target;
i2t->lun = link->lun;
- bcopy(xs->cmd, &i2t->cmd, xs->cmdlen);
+ memcpy(&i2t->cmd, xs->cmd, xs->cmdlen);
i2t->cmdlen = xs->cmdlen;
i2t->datalen = xs->datalen;
@@ -455,7 +455,7 @@ vscsi_t2i(struct vscsi_softc *sc, struct vscsi_ioc_t2i *t2i)
break;
case VSCSI_STAT_SENSE:
xs->error = XS_SENSE;
- bcopy(&t2i->sense, &xs->sense, sizeof(xs->sense));
+ memcpy(&xs->sense, &t2i->sense, sizeof(xs->sense));
break;
case VSCSI_STAT_RESET:
xs->error = XS_RESET;