Print this page
6141 use kmem_zalloc instead of kmem_alloc + bzero/memset

@@ -26,12 +26,10 @@
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
 /*        All Rights Reserved   */
 
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"        /* from S5R4 1.10 */
-
 /*
  * Description: The pckt module packetizes messages on
  *              its read queue by pre-fixing an M_PROTO
  *              message type to certain incoming messages.
  */

@@ -222,12 +220,11 @@
         }
 
         /*
          * Allocate state structure.
          */
-        pip = kmem_alloc(sizeof (*pip), KM_SLEEP);
-        bzero(pip, sizeof (*pip));
+        pip = kmem_zalloc(sizeof (*pip), KM_SLEEP);
 
 #ifdef _MULTI_DATAMODEL
         pip->model = ddi_model_convert_from(get_udatamodel());
 #endif /* _MULTI_DATAMODEL */