summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2007-09-19 12:00:35 +0000
committerdlg <dlg@openbsd.org>2007-09-19 12:00:35 +0000
commitb69f9938d327e80e98ece75f31dc44b468b528a7 (patch)
tree265f79c58f781bbf584666e060491c86808bc45c
parentUsage of fgetln() instead of fgets() in .cvsrc parsing handles line (diff)
downloadwireguard-openbsd-b69f9938d327e80e98ece75f31dc44b468b528a7.tar.xz
wireguard-openbsd-b69f9938d327e80e98ece75f31dc44b468b528a7.zip
M_ZERO. all the cool kids are doing it.
-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);