summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-09-07 15:00:21 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-09-07 15:00:21 +0000
commit85ce33f47337d8ae2200b69c865bad9704a53564 (patch)
tree45c03da13cdd18d57180b1614667ab28a7a26012 /sys/arch/i386/pci
parent27eb8946aec561bdd8abb9e09db43d6f4093d59a (diff)
Use M_ZERO in a few more places to shave bytes from the kernel.
eyeballed and ok dlg@
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r--sys/arch/i386/pci/glxsb.c8
-rw-r--r--sys/arch/i386/pci/pci_intr_fixup.c6
2 files changed, 5 insertions, 9 deletions
diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c
index 164090dbf98..4e9a6758cd1 100644
--- a/sys/arch/i386/pci/glxsb.c
+++ b/sys/arch/i386/pci/glxsb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glxsb.c,v 1.8 2007/08/07 09:48:23 markus Exp $ */
+/* $OpenBSD: glxsb.c,v 1.9 2007/09/07 15:00:19 art Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
@@ -405,14 +405,12 @@ glxsb_crypto_newsession(uint32_t *sidp, struct cryptoini *cri)
case CRYPTO_SHA2_512_HMAC:
axf = &auth_hash_hmac_sha2_512_96;
authcommon:
- MALLOC(swd, struct swcr_data *,
- sizeof(struct swcr_data), M_CRYPTO_DATA,
- M_NOWAIT);
+ swd = malloc(sizeof(struct swcr_data), M_CRYPTO_DATA,
+ M_NOWAIT|M_ZERO);
if (swd == NULL) {
glxsb_crypto_freesession(sesn);
return (ENOMEM);
}
- bzero(swd, sizeof(struct swcr_data));
ses->ses_swd = swd;
swd->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA,
diff --git a/sys/arch/i386/pci/pci_intr_fixup.c b/sys/arch/i386/pci/pci_intr_fixup.c
index 2efe7042303..9bd05575879 100644
--- a/sys/arch/i386/pci/pci_intr_fixup.c
+++ b/sys/arch/i386/pci/pci_intr_fixup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_intr_fixup.c,v 1.57 2007/07/07 13:52:42 grange Exp $ */
+/* $OpenBSD: pci_intr_fixup.c,v 1.58 2007/09/07 15:00:19 art Exp $ */
/* $NetBSD: pci_intr_fixup.c,v 1.10 2000/08/10 21:18:27 soda Exp $ */
/*
@@ -306,11 +306,9 @@ pciintr_link_alloc(pci_chipset_tag_t pc, struct pcibios_intr_routing *pir, int p
}
}
- if ((l = malloc(sizeof(*l), M_DEVBUF, M_NOWAIT)) == NULL)
+ if ((l = malloc(sizeof(*l), M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL)
return (NULL);
- memset(l, 0, sizeof(*l));
-
l->link = link;
l->bitmap = pir->linkmap[pin].bitmap;
if (pciintr_icu_tag != NULL) { /* compatible PCI ICU found */