Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Use M_ZERO. From OpenBSD if_wpi.c 1.53.
details: https://anonhg.NetBSD.org/src/rev/ccd8fb3895ee
branches: trunk
changeset: 330331:ccd8fb3895ee
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Jul 05 17:39:21 2014 +0000
description:
Use M_ZERO. From OpenBSD if_wpi.c 1.53.
diffstat:
sys/dev/pci/if_wpi.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 4cc2026e062d -r ccd8fb3895ee sys/dev/pci/if_wpi.c
--- a/sys/dev/pci/if_wpi.c Sat Jul 05 17:18:11 2014 +0000
+++ b/sys/dev/pci/if_wpi.c Sat Jul 05 17:39:21 2014 +0000
@@ -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 @@
}
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];
Home |
Main Index |
Thread Index |
Old Index