svn commit: r301681 - stable/9/sys/rpc

Garrett Cooper ngie at FreeBSD.org
Wed Jun 8 18:23:34 UTC 2016


Author: ngie
Date: Wed Jun  8 18:23:33 2016
New Revision: 301681
URL: https://svnweb.freebsd.org/changeset/base/301681

Log:
  MFstable/10 r301680:
  
  MFC r300625:
  
  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

Modified:
  stable/9/sys/rpc/svc.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/rpc/svc.c
==============================================================================
--- stable/9/sys/rpc/svc.c	Wed Jun  8 18:22:54 2016	(r301680)
+++ stable/9/sys/rpc/svc.c	Wed Jun  8 18:23:33 2016	(r301681)
@@ -848,9 +848,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);
 


More information about the svn-src-stable-9 mailing list