Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2011 11:47:08 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223947 - head/usr.bin/netstat
Message-ID:  <201107121147.p6CBl8hY037547@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue Jul 12 11:47:08 2011
New Revision: 223947
URL: http://svn.freebsd.org/changeset/base/223947

Log:
  Truncate link addresses like it is done for any
  other address type.
  
  MFC after: 4 weeks

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

Modified: head/usr.bin/netstat/if.c
==============================================================================
--- head/usr.bin/netstat/if.c	Tue Jul 12 10:07:07 2011	(r223946)
+++ head/usr.bin/netstat/if.c	Tue Jul 12 11:47:08 2011	(r223947)
@@ -394,7 +394,7 @@ intpr(int interval1, u_long ifnetaddr, v
 				n = cp - sa->sa_data + 1;
 				cp = sa->sa_data;
 			hexprint:
-				while (--n >= 0)
+				while ((--n >= 0) && (m < 30))
 					m += printf("%02x%c", *cp++ & 0xff,
 						    n > 0 ? ':' : ' ');
 				m = 32 - m;



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