svn commit: r271426 - head/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Thu Sep 11 12:54:18 UTC 2014
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
More information about the svn-src-all
mailing list