Module Name:    src
Committed By:   matt
Date:           Fri Apr 29 21:59:09 UTC 2011

Modified Files:
        src/sys/arch/mips/rmi: rmixl_pcix.c

Log Message:
Use M_ZERO with malloc instead of doing a explicit memset


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/rmi/rmixl_pcix.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_pcix.c
diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.5 src/sys/arch/mips/rmi/rmixl_pcix.c:1.6
--- src/sys/arch/mips/rmi/rmixl_pcix.c:1.5	Thu Apr 14 05:22:47 2011
+++ src/sys/arch/mips/rmi/rmixl_pcix.c	Fri Apr 29 21:59:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $	*/
+/*	$NetBSD: rmixl_pcix.c,v 1.6 2011/04/29 21:59:09 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.6 2011/04/29 21:59:09 matt Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -983,7 +983,7 @@
 	 * allocate and initialize softc intr struct
 	 * with one or more dispatch handles
 	 */
-	pip_new = malloc(size, M_DEVBUF, M_NOWAIT);
+	pip_new = malloc(size, M_DEVBUF, M_NOWAIT|M_ZERO);
 	if (pip_new == NULL) {
 #ifdef DIAGNOSTIC
 		printf("%s: cannot malloc\n", __func__);
@@ -991,8 +991,6 @@
 		return NULL;
 	}
 
-	memset(pip_new, 0, size);
-
 	if (pip_old == NULL) {
 		/* initialize the interrupt struct */
 		pip_new->sc = sc;

Reply via email to