From: David Miller <davem@davemloft.net>
To: nikolay@redhat.com
Cc: netdev@vger.kernel.org, andy@greyhouse.net, fubar@us.ibm.com
Subject: Re: [PATCH] bonding: make arp_ip_target parameter checks consistent with sysfs
Date: Wed, 28 Nov 2012 11:23:16 -0500 (EST) [thread overview]
Message-ID: <20121128.112316.33060261620694469.davem@davemloft.net> (raw)
In-Reply-To: <1353759675-30511-1-git-send-email-nikolay@redhat.com>
From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Sat, 24 Nov 2012 13:21:15 +0100
> @@ -4706,12 +4706,14 @@ static int bond_check_params(struct bond_params *params)
> arp_ip_count++) {
> /* not complete check, but should be good enough to
> catch mistakes */
> - if (!isdigit(arp_ip_target[arp_ip_count][0])) {
> + __be32 ip = in_aton(arp_ip_target[arp_ip_count]);
> + if (!isdigit(arp_ip_target[arp_ip_count][0])
> + || ip == 0
> + || ip == htonl(INADDR_BROADCAST)) {
Please format this properly, put the connecting operators at the end,
not the beginning, of the lines of the if statement, like so:
if (!isdigit(arp_ip_target[arp_ip_count][0]) ||
ip == 0 ||
ip == htonl(INADDR_BROADCAST)) {
Where else did you see the layout you used? It's not a prevalent
construct, so as far as I can tell you came up with it on your own.
Please don't do this, and instead use existing practice as your guide.
Thanks.
next prev parent reply other threads:[~2012-11-28 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-24 12:21 [PATCH] bonding: make arp_ip_target parameter checks consistent with sysfs Nikolay Aleksandrov
2012-11-28 16:23 ` David Miller [this message]
2012-11-28 16:33 ` Nikolay Aleksandrov
2012-11-28 17:34 ` Bjørn Mork
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=20121128.112316.33060261620694469.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andy@greyhouse.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@redhat.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).