sockstat display glitch with IPv6

Francis Gudin fgudin at nerim.net
Thu Apr 13 13:17:59 PDT 2006


('[patch]' removed from Subject line: issue tracker doesn't like it)

On 13-04-2006, Francis GUDIN <fgudin at xxxxxxxxx> wrote:
> diff -r 5e7796ecf9a8 usr.bin/sockstat/sockstat.c
> --- a/usr.bin/sockstat/sockstat.c	Fri Mar 24 07:57:30 2006 +0000
> +++ b/usr.bin/sockstat/sockstat.c	Thu Apr 13 21:41:02 2006 +0200
> @@ -506,8 +506,9 @@ display(void)
>  		case AF_INET:
>  		case AF_INET6:
>  			pos += printaddr(s->family, &s->laddr);
> -			while (pos < 58)
> +			while (pos < 57)
>  				pos += xprintf(" ");
> +			xprintf(" ");

                        ^^^^^^^^^^^^^
This                    |||||||||||||
should be               pos += xprintf(" ");
for correctness...

Sorry,

Francis.





More information about the Submit mailing list