[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121128.112316.33060261620694469.davem@davemloft.net>
Date:	Wed, 28 Nov 2012 11:23:16 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	nikolay@...hat.com
Cc:	netdev@...r.kernel.org, andy@...yhouse.net, fubar@...ibm.com
Subject: Re: [PATCH] bonding: make arp_ip_target parameter checks
 consistent with sysfs
From: Nikolay Aleksandrov <nikolay@...hat.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists
 
