Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2014 12:54:18 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271426 - head/sys/netinet6
Message-ID:  <201409111254.s8BCsI9Q016894@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Thu Sep 11 12:54:17 2014
New Revision: 271426
URL: http://svnweb.freebsd.org/changeset/base/271426

Log:
  * use M_ZERO flag with malloc instead of explicit zeroing.
  * remove MULTI_SCOPE ifdef.
  
  Obtained from:	Yandex LLC
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netinet6/scope6.c

Modified: head/sys/netinet6/scope6.c
==============================================================================
--- head/sys/netinet6/scope6.c	Thu Sep 11 12:33:37 2014	(r271425)
+++ head/sys/netinet6/scope6.c	Thu Sep 11 12:54:17 2014	(r271426)
@@ -100,22 +100,14 @@ scope6_ifattach(struct ifnet *ifp)
 {
 	struct scope6_id *sid;
 
-	sid = (struct scope6_id *)malloc(sizeof(*sid), M_IFADDR, M_WAITOK);
-	bzero(sid, sizeof(*sid));
-
+	sid = malloc(sizeof(*sid), M_IFADDR, M_WAITOK | M_ZERO);
 	/*
 	 * XXX: IPV6_ADDR_SCOPE_xxx macros are not standard.
 	 * Should we rather hardcode here?
 	 */
 	sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = ifp->if_index;
 	sid->s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = ifp->if_index;
-#ifdef MULTI_SCOPE
-	/* by default, we don't care about scope boundary for these scopes. */
-	sid->s6id_list[IPV6_ADDR_SCOPE_SITELOCAL] = 1;
-	sid->s6id_list[IPV6_ADDR_SCOPE_ORGLOCAL] = 1;
-#endif
-
-	return sid;
+	return (sid);
 }
 
 void



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