From: Michal Kubecek <mkubecek@suse.cz>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 net-next-for-3.13 1/2] iplink: display slave information
Date: Mon, 10 Feb 2014 19:24:59 +0100 [thread overview]
Message-ID: <20140210182459.GA26569@unicorn.suse.cz> (raw)
In-Reply-To: <20140210090916.34d4577e@nehalam.linuxnetplumber.net>
On Mon, Feb 10, 2014 at 09:09:16AM -0800, Stephen Hemminger wrote:
> On Mon, 10 Feb 2014 09:11:46 +0100 (CET)
> Michal Kubecek <mkubecek@suse.cz> wrote:
>
> > + if (1) {
> > + struct rtattr *attr[lu->maxslattr+1], **data = NULL;
> > +
> > + if (linkinfo[IFLA_INFO_SLAVE_DATA]) {
> > + parse_rtattr_nested(attr, lu->maxslattr,
> > + linkinfo[IFLA_INFO_SLAVE_DATA]);
> > + data = attr;
> > + }
> > + lu->print_slave_opt(lu, fp, data);
> > + }
> > }
>
> Ugly, please don't use if (1)
Normally I woudn't but it was already there this way in the original
code so I assumed there was a reason for that (even if I couldn't see
an obvious one).
Should I send a v2 or are you going to use the implementation submitted
by Jiri Pirko?
Michal Kubecek
prev parent reply other threads:[~2014-02-10 18:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 8:11 [PATCH iproute2 net-next-for-3.13 1/2] iplink: display slave information Michal Kubecek
2014-02-10 13:34 ` Sergei Shtylyov
2014-02-10 17:09 ` Stephen Hemminger
2014-02-10 18:24 ` Michal Kubecek [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=20140210182459.GA26569@unicorn.suse.cz \
--to=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--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 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).