summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_san_xilinx.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-08 04:15:16 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-08 04:15:16 +0000
commitd0aa54a0d4ea6a5829f72c5d8e83be3a2600deca (patch)
tree00047cb58ad4a4453db399c255919b5bd3fad9b7 /sys/dev/pci/if_san_xilinx.c
parent5fe5ffe7fab12d593fcc5f9f1fe293422159975c (diff)
More simple memset(,0,) -> M_ZERO changes. In this batch move to
size(*p) as the first malloc() parameter where p is declared locally and thus easy to check. Add M_ZERO to gpe_table allocation in acpi.c even though there is no obvious bzero or memset nearby.
Diffstat (limited to 'sys/dev/pci/if_san_xilinx.c')
-rw-r--r--sys/dev/pci/if_san_xilinx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/if_san_xilinx.c b/sys/dev/pci/if_san_xilinx.c
index dbcd6b91a13..98c4f9fb2b8 100644
--- a/sys/dev/pci/if_san_xilinx.c
+++ b/sys/dev/pci/if_san_xilinx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_san_xilinx.c,v 1.20 2007/09/17 01:33:33 krw Exp $ */
+/* $OpenBSD: if_san_xilinx.c,v 1.21 2007/10/08 04:15:15 krw Exp $ */
/*-
* Copyright (c) 2001-2004 Sangoma Technologies (SAN)
@@ -343,11 +343,10 @@ wan_xilinx_init(sdla_t *card)
timeout_set(&card->u.xilinx.led_timer, aft_led_timer, (void *)card);
/* allocate and initialize private data */
- sc = malloc(sizeof(xilinx_softc_t), M_DEVBUF, M_NOWAIT);
+ sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc == NULL)
return (NULL);
- memset(sc, 0, sizeof(xilinx_softc_t));
ifp = (struct ifnet *)&sc->common.ifp;
ifp->if_softc = sc;
sc->common.card = card;