Subject: Re: [PATCH iproute2 1/3] ss: Refactor inet_show_sock

From: Stephen Hemminger <[email-masked]>
Date: Mon, 27 Jun 2016 11:06:55 -0700

On Tue, 21 Jun 2016 20:38:24 -0700
David Ahern <[email-masked]> wrote:

> Extract parsing of sockstat and filter from inet_show_sock.
> While moving run_ssfilter into callers of inet_show_sock enable
> userspace filtering before the kill.
> 
> Signed-off-by: David Ahern <[email-masked]>

I would add this but it has checkpatch style issues

WARNING: braces {} are not necessary for any arm of this statement
#65: FILE: misc/ss.c:2060:
+	if (s->local.family == AF_INET) {
[...]
 	} else {
[...]

WARNING: line over 80 characters
#80: FILE: misc/ss.c:2070:
+static int inet_show_sock(struct nlmsghdr *nlh, struct sockstat *s, int protocol)

ERROR: do not use assignment in if condition
#129: FILE: misc/ss.c:2295:
+	if ((err = inet_show_sock(h, &s, diag_arg->protocol)) < 0)