summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccard
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-10-29 16:29:05 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-10-29 16:29:05 +0000
commit1978e2e6ea40985b076aa238f3190a54f9837413 (patch)
tree759b90ce4f5c4e9b4f91229f4a8c94c6796dc412 /sys/dev/pccard
parent13581bd748ff51a32a5893ce264830957a49a2ad (diff)
downloadFreeBSD-src-1978e2e6ea40985b076aa238f3190a54f9837413.zip
FreeBSD-src-1978e2e6ea40985b076aa238f3190a54f9837413.tar.gz
Make a few more mallocs use M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: imp
Diffstat (limited to 'sys/dev/pccard')
-rw-r--r--sys/dev/pccard/pccard.c4
-rw-r--r--sys/dev/pccard/pccard_cis.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 2e44639..03a0cce 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -159,8 +159,8 @@ pccard_attach_card(device_t dev)
* it might also just fall out of the FreeBSD resource model.
*
*/
- ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF, M_WAITOK);
- bzero(ivar, sizeof *ivar);
+ ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF,
+ M_WAITOK | M_ZERO);
child = device_add_child(dev, NULL, -1);
device_set_ivars(child, ivar);
ivar->fcn = pf;
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c
index dca15db..0fd70f0 100644
--- a/sys/dev/pccard/pccard_cis.c
+++ b/sys/dev/pccard/pccard_cis.c
@@ -756,8 +756,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg)
}
if ((state->pf == NULL) || (state->gotmfc == 2)) {
state->pf = malloc(sizeof(*state->pf), M_DEVBUF,
- M_NOWAIT);
- bzero(state->pf, sizeof(*state->pf));
+ M_NOWAIT | M_ZERO);
state->pf->number = state->count++;
state->pf->last_config_index = -1;
STAILQ_INIT(&state->pf->cfe_head);
@@ -794,8 +793,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg)
}
if (state->pf == NULL) {
state->pf = malloc(sizeof(*state->pf),
- M_DEVBUF, M_NOWAIT);
- bzero(state->pf, sizeof(*state->pf));
+ M_DEVBUF, M_NOWAIT | M_ZERO);
state->pf->number = state->count++;
state->pf->last_config_index = -1;
STAILQ_INIT(&state->pf->cfe_head);
OpenPOWER on IntegriCloud