Module Name: src
Committed By: jakllsch
Date: Sat Jul 5 17:39:21 UTC 2014
Modified Files:
src/sys/dev/pci: if_wpi.c
Log Message:
Use M_ZERO. From OpenBSD if_wpi.c 1.53.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/if_wpi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.61 src/sys/dev/pci/if_wpi.c:1.62
--- src/sys/dev/pci/if_wpi.c:1.61 Sat Jul 5 17:18:11 2014
+++ src/sys/dev/pci/if_wpi.c Sat Jul 5 17:39:21 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wpi.c,v 1.61 2014/07/05 17:18:11 jakllsch Exp $ */
+/* $NetBSD: if_wpi.c,v 1.62 2014/07/05 17:39:21 jakllsch Exp $ */
/*-
* Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.61 2014/07/05 17:18:11 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.62 2014/07/05 17:39:21 jakllsch Exp $");
/*
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -722,15 +722,13 @@ wpi_alloc_tx_ring(struct wpi_softc *sc,
}
ring->data = malloc(count * sizeof (struct wpi_tx_data), M_DEVBUF,
- M_NOWAIT);
+ M_NOWAIT | M_ZERO);
if (ring->data == NULL) {
aprint_error_dev(sc->sc_dev,
"could not allocate tx data slots\n");
goto fail;
}
- memset(ring->data, 0, count * sizeof (struct wpi_tx_data));
-
for (i = 0; i < count; i++) {
struct wpi_tx_data *data = &ring->data[i];