Improve consistency, not functional change.
MFC after: 3 days
This commit is contained in:
parent
5a62e92f44
commit
3aee58ca76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344704
@ -1128,10 +1128,10 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp,
|
||||
actual += sizeof(struct sockaddr_in6);
|
||||
} else {
|
||||
#endif
|
||||
memcpy(sas, sin, sizeof(*sin));
|
||||
memcpy(sas, sin, sizeof(struct sockaddr_in));
|
||||
((struct sockaddr_in *)sas)->sin_port = inp->sctp_lport;
|
||||
sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(*sin));
|
||||
actual += sizeof(*sin);
|
||||
sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in));
|
||||
actual += sizeof(struct sockaddr_in);
|
||||
#ifdef INET6
|
||||
}
|
||||
#endif
|
||||
@ -1182,10 +1182,10 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp,
|
||||
(IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) {
|
||||
continue;
|
||||
}
|
||||
memcpy(sas, sin6, sizeof(*sin6));
|
||||
memcpy(sas, sin6, sizeof(struct sockaddr_in6));
|
||||
((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport;
|
||||
sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(*sin6));
|
||||
actual += sizeof(*sin6);
|
||||
sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in6));
|
||||
actual += sizeof(struct sockaddr_in6);
|
||||
if (actual >= limit) {
|
||||
return (actual);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user