Use M_ZERO as appropriate. (fix an improper use of M_WAIT to M_WAITOK)

This commit is contained in:
matt 2004-04-18 18:55:57 +00:00
parent 06a490c597
commit be4b6d7ee9
2 changed files with 6 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: at_control.c,v 1.8 2003/06/02 10:33:25 is Exp $ */
/* $NetBSD: at_control.c,v 1.9 2004/04/18 18:55:57 matt Exp $ */
/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: at_control.c,v 1.8 2003/06/02 10:33:25 is Exp $");
__KERNEL_RCSID(0, "$NetBSD: at_control.c,v 1.9 2004/04/18 18:55:57 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -167,12 +167,11 @@ at_control(cmd, data, ifp, p)
if (aa == (struct at_ifaddr *) 0) {
aa = (struct at_ifaddr *)
malloc(sizeof(struct at_ifaddr), M_IFADDR,
M_WAITOK);
M_WAITOK|M_ZERO);
if (aa == NULL)
return (ENOBUFS);
bzero(aa, sizeof *aa);
callout_init(&aa->aa_probe_ch);
if ((aa0 = at_ifaddr.tqh_first) != NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ddp_usrreq.c,v 1.11 2003/06/29 22:31:54 fvdl Exp $ */
/* $NetBSD: ddp_usrreq.c,v 1.12 2004/04/18 18:55:57 matt Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.11 2003/06/29 22:31:54 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.12 2004/04/18 18:55:57 matt Exp $");
#include "opt_mbuftrace.h"
@ -440,10 +440,9 @@ at_pcballoc(so)
{
struct ddpcb *ddp;
MALLOC(ddp, struct ddpcb *, sizeof(*ddp), M_PCB, M_WAIT);
MALLOC(ddp, struct ddpcb *, sizeof(*ddp), M_PCB, M_WAITOK|M_ZERO);
if (!ddp)
panic("at_pcballoc");
bzero((caddr_t) ddp, sizeof *ddp);
ddp->ddp_lsat.sat_port = ATADDR_ANYPORT;
ddp->ddp_next = ddpcb;