diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-17 01:33:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-17 01:33:34 +0000 |
commit | a854e6884a9635329a1490f5cf8420c8ab6f8f85 (patch) | |
tree | 29bd971e80c3ea6bf34f989e494141dcc2c006cb /sys/dev/pci/agp.c | |
parent | 1dd97578d5974d04f8b171b17c36e35635acd61b (diff) |
Only the most obvious bzero() -> M_ZERO changes. No cast changes, no
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an
immediately adjacent bzero().
Diffstat (limited to 'sys/dev/pci/agp.c')
-rw-r--r-- | sys/dev/pci/agp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 20147866804..52faa49e477 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp.c,v 1.6 2007/08/04 19:40:25 reyk Exp $ */ +/* $OpenBSD: agp.c,v 1.7 2007/09/17 01:33:33 krw Exp $ */ /*- * Copyright (c) 2000 Doug Rabson * All rights reserved. @@ -372,10 +372,9 @@ agp_alloc_gatt(struct vga_pci_softc *sc) struct agp_gatt *gatt; int nseg; - gatt = malloc(sizeof(*gatt), M_DEVBUF, M_NOWAIT); + gatt = malloc(sizeof(*gatt), M_DEVBUF, M_NOWAIT | M_ZERO); if (!gatt) return (NULL); - bzero(gatt, sizeof(*gatt)); gatt->ag_entries = entries; if (agp_alloc_dmamem(sc->sc_dmat, entries * sizeof(u_int32_t), @@ -474,10 +473,9 @@ agp_generic_alloc_memory(struct vga_pci_softc *sc, int type, vsize_t size) return 0; } - mem = malloc(sizeof *mem, M_DEVBUF, M_WAITOK); + mem = malloc(sizeof *mem, M_DEVBUF, M_WAITOK | M_ZERO); if (mem == NULL) return NULL; - bzero(mem, sizeof *mem); if (bus_dmamap_create(sc->sc_dmat, size, size / PAGE_SIZE + 1, size, 0, BUS_DMA_NOWAIT, &mem->am_dmamap) != 0) { |