netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: vadim4j@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 REGRESSIONS v2] ss: Fix layout/output issues introduced by regression
Date: Fri, 05 Dec 2014 20:22:40 +0300	[thread overview]
Message-ID: <5481E9E0.6080809@cogentembedded.com> (raw)
In-Reply-To: <20141205170641.GA23226@angus-think.wlc.globallogic.com>

On 12/05/2014 08:06 PM, vadim4j@gmail.com wrote:

>   [...]
>>> @@ -2912,11 +2910,12 @@ static void netlink_show_one(struct filter *f,
>>>   		printf("%-*s ", state_width, "UNCONN");
>>>   	printf("%-6d %-6d ", rq, wq);
>>>
>>> -	if (resolve_services)
>>> -	{
>>> +	if (resolve_services) {
>>>   		printf("%*s:", addr_width, nl_proto_n2a(prot, prot_name,
>>>   					sizeof(prot_name)));
>>> -	}
>>> +	} else
>>> +		printf("%*d:", addr_width, prot);
>>> +

>>     Extra empty line hardly needed here. And if iproute2 follows the Linux
>> kernel style, {} should be used in all arms of the *if* statement (since
>> it's used in one case).

>>>
>>>   	if (pid == -1) {
>>>   		printf("%-*s ", serv_width, "*");

> You mean change to this ?

> 	if (resolve_services) {
>   		printf("%*s:", addr_width, nl_proto_n2a(prot, prot_name,
>   					sizeof(prot_name)));
> 	} else {
> 		printf("%*d:", addr_width, prot);
>          }

    Yes (but indent } with tab please).

> Thanks,

WBR, Sergei

  reply	other threads:[~2014-12-05 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-05 15:03 [PATCH iproute2 REGRESSIONS v2] ss: Fix layout/output issues introduced by regression Vadim Kochan
2014-12-05 17:12 ` Sergei Shtylyov
2014-12-05 17:06   ` vadim4j
2014-12-05 17:22     ` Sergei Shtylyov [this message]
2014-12-05 17:21       ` vadim4j

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=5481E9E0.6080809@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=netdev@vger.kernel.org \
    --cc=vadim4j@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).