summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_tht.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-09-19 12:00:36 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-09-19 12:00:36 +0000
commit4dd3522db4a003d55f04e2240af1b3f4bea6a091 (patch)
tree5d115d1f1238d9e84642a54cf2db6ef4894508b9 /sys/dev/pci/if_tht.c
parent3fd9c2ed02c85193a15fc7fe2e96e6cc008cb44a (diff)
M_ZERO. all the cool kids are doing it.
Diffstat (limited to 'sys/dev/pci/if_tht.c')
-rw-r--r--sys/dev/pci/if_tht.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index 63688a4fb6a..aa16fcfd68c 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.108 2007/07/22 03:54:15 dlg Exp $ */
+/* $OpenBSD: if_tht.c,v 1.109 2007/09/19 12:00:35 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1837,8 +1837,7 @@ tht_dmamem_alloc(struct tht_softc *sc, bus_size_t size, bus_size_t align)
struct tht_dmamem *tdm;
int nsegs;
- tdm = malloc(sizeof(struct tht_dmamem), M_DEVBUF, M_WAITOK);
- bzero(tdm, sizeof(struct tht_dmamem));
+ tdm = malloc(sizeof(struct tht_dmamem), M_DEVBUF, M_WAITOK | M_ZERO);
tdm->tdm_size = size;
if (bus_dmamap_create(dmat, size, 1, size, 0,
@@ -1894,8 +1893,7 @@ tht_pkt_alloc(struct tht_softc *sc, struct tht_pkt_list *tpl, int npkts,
int i;
tpl->tpl_pkts = malloc(sizeof(struct tht_pkt) * npkts, M_DEVBUF,
- M_WAITOK);
- bzero(tpl->tpl_pkts, sizeof(struct tht_pkt) * npkts);
+ M_WAITOK | M_ZERO);
TAILQ_INIT(&tpl->tpl_free);
TAILQ_INIT(&tpl->tpl_used);