[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86d8b203-69bd-e466-715d-959368685839@web.de>
Date: Thu, 30 May 2019 11:11:24 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Josh Hunt <johunt@...mai.com>, David Ahern <dsahern@...il.com>,
netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ss: add option to print socket information on one line
This software update caught also my development attention a moment ago.
> +++ b/misc/ss.c
> @@ -3973,7 +3975,10 @@ static int packet_show_sock(struct nlmsghdr *nlh, void *arg)
>
> if (show_details) {
> if (pinfo) {
> - out("\n\tver:%d", pinfo->pdi_version);
> + if (oneline)
> + out(" ver:%d", pinfo->pdi_version);
> + else
> + out("\n\tver:%d", pinfo->pdi_version);
> out(" cpy_thresh:%d", pinfo->pdi_copy_thresh);
> out(" flags( ");
> if (pinfo->pdi_flags & PDI_RUNNING)
I would find it nicer to use the ternary operator here.
+ out(oneline ? " ver:%d" : "\n\tver:%d",
+ pinfo->pdi_version);
How do you think about to use more succinct statement variants?
Regards,
Markus
Powered by blists - more mailing lists