diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-04-09 17:01:31 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-04-09 17:01:31 +0000 |
commit | 2a6b31f36b9e2c5c5aaaf58d2b2a4da950b565b7 (patch) | |
tree | 7fab941868713cc63fedd50e5218d38d6ab7c07e /sys/arch/macppc | |
parent | 0f6628ed289b8009ce583438b16c6eb454e649ba (diff) |
- don't use memset() where we should use bzero()
* no binary change
ok drahn@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/dev/maci2c.c | 6 | ||||
-rw-r--r-- | sys/arch/macppc/dev/mediabay.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/dev/mesh.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/dev/tpms.c | 10 | ||||
-rw-r--r-- | sys/arch/macppc/dev/zs.c | 8 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/macppc/dev/maci2c.c b/sys/arch/macppc/dev/maci2c.c index cf1ee4a22ff..f54500137a4 100644 --- a/sys/arch/macppc/dev/maci2c.c +++ b/sys/arch/macppc/dev/maci2c.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maci2c.c,v 1.9 2006/02/14 20:54:45 kettenis Exp $ */ +/* $OpenBSD: maci2c.c,v 1.10 2010/04/09 17:01:30 jasper Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -39,10 +39,10 @@ maciic_scan(struct device *self, struct i2cbus_attach_args *iba, void *aux) if (OF_getprop(node, "reg", ®, sizeof reg) != sizeof reg && OF_getprop(node, "i2c-address", ®, sizeof reg) != sizeof reg) continue; - memset(&ia, 0, sizeof ia); + bzero(&ia, sizeof ia); ia.ia_tag = iba->iba_tag; ia.ia_addr = (reg >> 1); - memset(name, 0, sizeof name); + bzero(name, sizeof name); if (OF_getprop(node, "compatible", &name, sizeof name) && name[0]) ia.ia_name = name; diff --git a/sys/arch/macppc/dev/mediabay.c b/sys/arch/macppc/dev/mediabay.c index 9eb596113e2..1004f88673a 100644 --- a/sys/arch/macppc/dev/mediabay.c +++ b/sys/arch/macppc/dev/mediabay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mediabay.c,v 1.3 2006/06/19 22:42:33 miod Exp $ */ +/* $OpenBSD: mediabay.c,v 1.4 2010/04/09 17:01:30 jasper Exp $ */ /* $NetBSD: mediabay.c,v 1.9 2003/07/15 02:43:29 lukem Exp $ */ /*- @@ -165,7 +165,7 @@ mediabay_attach_content(sc) delay(50000); for (child = OF_child(sc->sc_node); child; child = OF_peer(child)) { - memset(name, 0, sizeof(name)); + bzero(name, sizeof(name)); if (OF_getprop(child, "name", name, sizeof(name)) == -1) continue; ca.ca_name = name; diff --git a/sys/arch/macppc/dev/mesh.c b/sys/arch/macppc/dev/mesh.c index d3e8b2308dd..c3862017f85 100644 --- a/sys/arch/macppc/dev/mesh.c +++ b/sys/arch/macppc/dev/mesh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mesh.c,v 1.25 2010/03/23 01:57:19 krw Exp $ */ +/* $OpenBSD: mesh.c,v 1.26 2010/04/09 17:01:30 jasper Exp $ */ /* $NetBSD: mesh.c,v 1.1 1999/02/19 13:06:03 tsubai Exp $ */ /*- @@ -283,7 +283,7 @@ mesh_match(struct device *parent, void *vcf, void *aux) if (strcmp(ca->ca_name, "mesh") == 0) return 1; - memset(compat, 0, sizeof(compat)); + bzero(compat, sizeof(compat)); OF_getprop(ca->ca_node, "compatible", compat, sizeof(compat)); if (strcmp(compat, "chrp,mesh0") == 0) return 1; diff --git a/sys/arch/macppc/dev/tpms.c b/sys/arch/macppc/dev/tpms.c index fad1671b045..40567c34d76 100644 --- a/sys/arch/macppc/dev/tpms.c +++ b/sys/arch/macppc/dev/tpms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tpms.c,v 1.14 2009/10/13 19:33:16 pirofti Exp $ */ +/* $OpenBSD: tpms.c,v 1.15 2010/04/09 17:01:30 jasper Exp $ */ /* * Copyright (c) 2005, Johan Wallén @@ -435,7 +435,7 @@ tpms_enable(void *v) sc->sc_status |= TPMS_ENABLED; sc->sc_status &= ~TPMS_VALID; sc->sc_buttons = 0; - memset(sc->sc_sample, 0, sizeof(sc->sc_sample)); + bzero(sc->sc_sample, sizeof(sc->sc_sample)); return (uhidev_open(&sc->sc_hdev)); } @@ -497,7 +497,7 @@ tpms_intr(struct uhidev *addr, void *ibuf, unsigned int len) sc->sc_x = sc->sc_y = -1; sc->sc_x_raw = sc->sc_y_raw = -1; memcpy(sc->sc_prev, sc->sc_sample, sizeof(sc->sc_prev)); - memset(sc->sc_acc, 0, sizeof(sc->sc_acc)); + bzero(sc->sc_acc, sizeof(sc->sc_acc)); return; } /* Accumulate the sensor change while keeping it nonnegative. */ @@ -540,7 +540,7 @@ reorder_sample(struct tpms_softc *sc, unsigned char *to, unsigned char *from) if (sc->sc_type == GEYSER2) { int j; - memset(to, 0, TPMS_SENSORS); + bzero(to, TPMS_SENSORS); for (i = 0, j = 19; i < 20; i += 2, j += 3) { to[i] = from[j]; to[i + 1] = from[j + 1]; @@ -596,7 +596,7 @@ compute_delta(struct tpms_softc *sc, int *dx, int *dy, int *dz, /* Check the number of fingers and if we have detected a position. */ if (x_det == 0 && y_det == 0) { /* No position detected, resetting. */ - memset(sc->sc_acc, 0, sizeof(sc->sc_acc)); + bzero(sc->sc_acc, sizeof(sc->sc_acc)); sc->sc_x_raw = sc->sc_y_raw = sc->sc_x = sc->sc_y = -1; } else if (x_det > 0 && y_det > 0) { switch (fingers) { diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c index 0cfbb93f9f3..45e6c79477c 100644 --- a/sys/arch/macppc/dev/zs.c +++ b/sys/arch/macppc/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.18 2009/10/01 20:19:18 kettenis Exp $ */ +/* $OpenBSD: zs.c,v 1.19 2010/04/09 17:01:30 jasper Exp $ */ /* $NetBSD: zs.c,v 1.17 2001/06/19 13:42:15 wiz Exp $ */ /* @@ -1062,14 +1062,14 @@ zscnprobe(cp) if ((pkg = OF_instance_to_package(stdin)) == -1) return; - memset(name, 0, sizeof(name)); + bzero(name, sizeof(name)); if (OF_getprop(pkg, "device_type", name, sizeof(name)) == -1) return; if (strcmp(name, "serial") != 0) return; - memset(name, 0, sizeof(name)); + bzero(name, sizeof(name)); if (OF_getprop(pkg, "name", name, sizeof(name)) == -1) return; @@ -1099,7 +1099,7 @@ zscninit(cp) if ((escc_ch = OF_instance_to_package(stdin)) == -1) return; - memset(name, 0, sizeof(name)); + bzero(name, sizeof(name)); if (OF_getprop(escc_ch, "name", name, sizeof(name)) == -1) return; |