Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Aug 2019 20:36:25 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350522 - head/usr.bin/netstat
Message-ID:  <201908012036.x71KaPla061046@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Thu Aug  1 20:36:25 2019
New Revision: 350522
URL: https://svnweb.freebsd.org/changeset/base/350522

Log:
  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.
  
  MFC after:		3 months
  Sponsored by:		Netflix

Modified:
  head/usr.bin/netstat/inet6.c

Modified: head/usr.bin/netstat/inet6.c
==============================================================================
--- head/usr.bin/netstat/inet6.c	Thu Aug  1 20:26:27 2019	(r350521)
+++ head/usr.bin/netstat/inet6.c	Thu Aug  1 20:36:25 2019	(r350522)
@@ -1310,7 +1310,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;
@@ -1319,7 +1319,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);
 	}
@@ -1332,9 +1332,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,



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