Subject: Re: [iproute PATCH 3/3] ss: Fix width calculations when Netid or State columns are missing

From: Stefano Brivio <[email-masked]>
Date: Tue, 31 Oct 2017 18:02:11 +0100

On Tue, 31 Oct 2017 17:55:06 +0100
Stephen Hemminger <[email-masked]> wrote:

> On Sun, 29 Oct 2017 21:22:34 +0100
> Stefano Brivio <[email-masked]> wrote:
> 
> > +	addrp_width -= netid_width + 1 * !!netid_width;
> > +	addrp_width -= state_width + 1 * !!state_width;  
> 
> Doing !! here is being too bit tricky for code that is not performance sensitive.
> Just use an if statement or ? :

Sure.

> > @@ -4373,6 +4374,8 @@ int main(int argc, char *argv[])
> >  			netid_width++;
> >  		else if (state_width)
> >  			state_width++;
> > +		else
> > +			odd_width_pad=" ";  
> 
> Missing whitespace.

Oops. Thanks. I'll fix both issues in v2.

-- 
Stefano