From d0aa54a0d4ea6a5829f72c5d8e83be3a2600deca Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Mon, 8 Oct 2007 04:15:16 +0000 Subject: 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. --- sys/dev/pci/if_san_xilinx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/pci/if_san_xilinx.c') 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; -- cgit v1.2.3