Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2016 20:06:41 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300625 - head/sys/rpc
Message-ID:  <201605242006.u4OK6fjl015139@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue May 24 20:06:41 2016
New Revision: 300625
URL: https://svnweb.freebsd.org/changeset/base/300625

Log:
  Remove unnecessary memset(.., 0, ..)'s
  
  The mem_alloc macro calls calloc (userspace) / malloc(.., M_WAITOK|M_ZERO)
  under the covers, so zeroing out memory is already handled by the underlying
  calls
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/rpc/svc.c

Modified: head/sys/rpc/svc.c
==============================================================================
--- head/sys/rpc/svc.c	Tue May 24 19:52:05 2016	(r300624)
+++ head/sys/rpc/svc.c	Tue May 24 20:06:41 2016	(r300625)
@@ -847,9 +847,7 @@ svc_xprt_alloc()
 	SVCXPRT_EXT *ext;
 
 	xprt = mem_alloc(sizeof(SVCXPRT));
-	memset(xprt, 0, sizeof(SVCXPRT));
 	ext = mem_alloc(sizeof(SVCXPRT_EXT));
-	memset(ext, 0, sizeof(SVCXPRT_EXT));
 	xprt->xp_p3 = ext;
 	refcount_init(&xprt->xp_refs, 1);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605242006.u4OK6fjl015139>