svn commit: r300625 - head/sys/rpc
Garrett Cooper
ngie at FreeBSD.org
Tue May 24 20:06:42 UTC 2016
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);
More information about the svn-src-all
mailing list