svn commit: r355869 - stable/11/usr.bin/netstat
Bjoern A. Zeeb
bz at FreeBSD.org
Tue Dec 17 23:45:50 UTC 2019
Author: bz
Date: Tue Dec 17 23:45:50 2019
New Revision: 355869
URL: https://svnweb.freebsd.org/changeset/base/355869
Log:
MFC r350522:
IPv6 cleanup: netstat
Rename the variable for the in6_addr from in6p to ia6 to follow the
convention generally used in FreeBSD.
No functional changes.
Sponsored by: Netflix
Modified:
stable/11/usr.bin/netstat/inet6.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/usr.bin/netstat/inet6.c
==============================================================================
--- stable/11/usr.bin/netstat/inet6.c Tue Dec 17 23:45:34 2019 (r355868)
+++ stable/11/usr.bin/netstat/inet6.c Tue Dec 17 23:45:50 2019 (r355869)
@@ -1306,7 +1306,7 @@ inet6print(const char *container, struct in6_addr *in6
*/
char *
-inet6name(struct in6_addr *in6p)
+inet6name(struct in6_addr *ia6)
{
struct sockaddr_in6 sin6;
char hbuf[NI_MAXHOST], *cp;
@@ -1315,7 +1315,7 @@ inet6name(struct in6_addr *in6p)
static int first = 1;
int flags, error;
- if (IN6_IS_ADDR_UNSPECIFIED(in6p)) {
+ if (IN6_IS_ADDR_UNSPECIFIED(ia6)) {
strcpy(line, "*");
return (line);
}
@@ -1328,9 +1328,9 @@ inet6name(struct in6_addr *in6p)
domain[0] = 0;
}
memset(&sin6, 0, sizeof(sin6));
- memcpy(&sin6.sin6_addr, in6p, sizeof(*in6p));
+ memcpy(&sin6.sin6_addr, ia6, sizeof(*ia6));
sin6.sin6_family = AF_INET6;
- /* XXX: in6p.s6_addr[2] can contain scopeid. */
+ /* XXX: ia6.s6_addr[2] can contain scopeid. */
in6_fillscopeid(&sin6);
flags = (numeric_addr) ? NI_NUMERICHOST : 0;
error = getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), hbuf,
More information about the svn-src-stable
mailing list