Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Mar 2016 15:06:50 +0000 (UTC)
From:      Maxim Konovalov <maxim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r297024 - head/sbin/ping
Message-ID:  <201603181506.u2IF6ooT077755@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: maxim
Date: Fri Mar 18 15:06:50 2016
New Revision: 297024
URL: https://svnweb.freebsd.org/changeset/base/297024

Log:
  o No need to resolve a mask that we get with ICMP_MASKREPLY,
  pass it directly to inet_ntoa(3).

Modified:
  head/sbin/ping/ping.c

Modified: head/sbin/ping/ping.c
==============================================================================
--- head/sbin/ping/ping.c	Fri Mar 18 14:49:11 2016	(r297023)
+++ head/sbin/ping/ping.c	Fri Mar 18 15:06:50 2016	(r297024)
@@ -1201,7 +1201,7 @@ pr_pack(char *buf, int cc, struct sockad
 			if (options & F_MASK) {
 				/* Just prentend this cast isn't ugly */
 				(void)printf(" mask=%s",
-					pr_addr(*(struct in_addr *)&(icp->icmp_mask)));
+					inet_ntoa(*(struct in_addr *)&(icp->icmp_mask)));
 			}
 			if (options & F_TIME) {
 				(void)printf(" tso=%s", pr_ntime(icp->icmp_otime));



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