summaryrefslogtreecommitdiffstats
path: root/sys/dev/lmc
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
commitdd75d1d73b4f3034c1d9f621a49fff58b1d71eb1 (patch)
tree197ae73617ae75afe008897f6906b84835589ea2 /sys/dev/lmc
parented5dbfbd3cd619638a7baac288f548aa1398edac (diff)
downloadFreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.zip
FreeBSD-src-dd75d1d73b4f3034c1d9f621a49fff58b1d71eb1.tar.gz
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
Diffstat (limited to 'sys/dev/lmc')
-rw-r--r--sys/dev/lmc/if_lmc.c3
-rw-r--r--sys/dev/lmc/if_lmc_fbsd3.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index a6c91a9..cf220f7 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -1342,12 +1342,11 @@ ng_lmc_rcvmsg(node_p node, struct ng_mesg *msg,
int pos = 0;
int resplen = sizeof(struct ng_mesg) + 512;
MALLOC(resp, struct ng_mesg *, resplen, M_NETGRAPH,
- M_NOWAIT);
+ M_NOWAIT | M_ZERO);
if (resp == NULL) {
error = ENOMEM;
break;
}
- bzero(resp, resplen);
arg = (resp)->data;
/*
diff --git a/sys/dev/lmc/if_lmc_fbsd3.c b/sys/dev/lmc/if_lmc_fbsd3.c
index ce7c947..f6f9bf9 100644
--- a/sys/dev/lmc/if_lmc_fbsd3.c
+++ b/sys/dev/lmc/if_lmc_fbsd3.c
@@ -137,10 +137,9 @@ lmc_pci_attach(pcici_t config_id, int unit)
/*
* allocate memory for the softc
*/
- sc = (lmc_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT);
+ sc = (lmc_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc == NULL)
return;
- bzero(sc, sizeof(*sc)); /* Zero out the softc*/
revinfo = PCI_CONF_READ(PCI_CFRV) & 0xFF;
id = PCI_CONF_READ(PCI_CFID);
OpenPOWER on IntegriCloud