summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
commitdd75d1d73b4f3034c1d9f621a49fff58b1d71eb1 (patch)
tree197ae73617ae75afe008897f6906b84835589ea2 /sys/dev/ppbus
parented5dbfbd3cd619638a7baac288f548aa1398edac (diff)
downloadFreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.zip
FreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.tar.gz
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r--sys/dev/ppbus/ppbconf.c4
-rw-r--r--sys/dev/ppbus/vpo.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ppbus/ppbconf.c b/sys/dev/ppbus/ppbconf.c
index 6f6bf95..b494405 100644
--- a/sys/dev/ppbus/ppbconf.c
+++ b/sys/dev/ppbus/ppbconf.c
@@ -86,10 +86,10 @@ ppbus_add_child(device_t dev, int order, const char *name, int unit)
device_t child;
/* allocate ivars for the new ppbus child */
- ppbdev = malloc(sizeof(struct ppb_device), M_PPBUSDEV, M_NOWAIT);
+ ppbdev = malloc(sizeof(struct ppb_device), M_PPBUSDEV,
+ M_NOWAIT | M_ZERO);
if (!ppbdev)
return NULL;
- bzero(ppbdev, sizeof *ppbdev);
/* initialize the ivars */
ppbdev->name = name;
diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c
index fafc3f1..1c409d5 100644
--- a/sys/dev/ppbus/vpo.c
+++ b/sys/dev/ppbus/vpo.c
@@ -186,9 +186,7 @@ static void
vpo_cam_rescan(struct vpo_data *vpo)
{
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK);
-
- bzero(ccb, sizeof(union ccb));
+ union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0)
!= CAM_REQ_CMP) {
OpenPOWER on IntegriCloud