diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-06 23:50:56 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-06 23:50:56 +0000 |
commit | f5461d41b129fefc48ff4c9ded82554394de9bf0 (patch) | |
tree | 86f9d97cdbd7712121debe572c568e72070e2559 /sys/dev/pci/agp_via.c | |
parent | fd70724e0c6df0ffd868e0c7d80b8f683072b49a (diff) |
Simpliest memset(,0,) -> M_ZERO changes. One (caddr *) cast removal,
otherwise just adding M_ZERO to malloc() and removing the immediately
adjacent memset(,0,).
Diffstat (limited to 'sys/dev/pci/agp_via.c')
-rw-r--r-- | sys/dev/pci/agp_via.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/agp_via.c b/sys/dev/pci/agp_via.c index ddee7cf101f..bb9c0114699 100644 --- a/sys/dev/pci/agp_via.c +++ b/sys/dev/pci/agp_via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_via.c,v 1.3 2007/08/04 19:40:25 reyk Exp $ */ +/* $OpenBSD: agp_via.c,v 1.4 2007/10/06 23:50:54 krw Exp $ */ /* $NetBSD: agp_via.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -80,12 +80,11 @@ agp_via_attach(struct vga_pci_softc *sc, struct pci_attach_args *pa, struct agp_via_softc *asc; struct agp_gatt *gatt; - asc = malloc(sizeof *asc, M_DEVBUF, M_NOWAIT); + asc = malloc(sizeof *asc, M_DEVBUF, M_NOWAIT | M_ZERO); if (asc == NULL) { printf(": can't allocate chipset-specific softc\n"); return (ENOMEM); } - memset(asc, 0, sizeof *asc); sc->sc_chipc = asc; sc->sc_methods = &agp_via_methods; |