Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 18:23:33 +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-9@freebsd.org
Subject:   svn commit: r301681 - stable/9/sys/rpc
Message-ID:  <201606081823.u58INXvL053444@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



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