Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 18:22:55 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r301680 - stable/10/sys/rpc
Message-ID:  <201606081822.u58IMtc6053354@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Jun  8 18:22:54 2016
New Revision: 301680
URL: https://svnweb.freebsd.org/changeset/base/301680

Log:
  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/10/sys/rpc/svc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/rpc/svc.c
==============================================================================
--- stable/10/sys/rpc/svc.c	Wed Jun  8 18:21:27 2016	(r301679)
+++ stable/10/sys/rpc/svc.c	Wed Jun  8 18:22:54 2016	(r301680)
@@ -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?201606081822.u58IMtc6053354>