All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Phil Sutter <phil@nwl.cc>
Subject: Re: [iproute PATCH 3/3] ss: Fix width calculations when Netid or State columns are missing
Date: Tue, 31 Oct 2017 18:02:11 +0100	[thread overview]
Message-ID: <20171031180211.2bd749bf@elisabeth> (raw)
In-Reply-To: <20171031175506.6a7ff560@shemminger-XPS-13-9360>

On Tue, 31 Oct 2017 17:55:06 +0100
Stephen Hemminger <stephen@networkplumber.org> wrote:

> On Sun, 29 Oct 2017 21:22:34 +0100
> Stefano Brivio <sbrivio@redhat.com> 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

      reply	other threads:[~2017-10-31 17:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29 20:22 [iproute PATCH 0/3] ss: netlink_show_one() clean-up, minor output fix Stefano Brivio
2017-10-29 20:22 ` [iproute PATCH 1/3] ss: Remove useless width specifier in process context print Stefano Brivio
2017-10-29 20:22 ` [iproute PATCH 2/3] ss: Streamline process context printing in netlink_show_one() Stefano Brivio
2017-10-29 20:22 ` [iproute PATCH 3/3] ss: Fix width calculations when Netid or State columns are missing Stefano Brivio
2017-10-31 16:55   ` Stephen Hemminger
2017-10-31 17:02     ` Stefano Brivio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171031180211.2bd749bf@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.