lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 01 Jul 2013 12:18:54 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jackm@....mellanox.co.il
Cc:	ogerlitz@...lanox.com, roland@...nel.org,
	linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
	eli@....mellanox.co.il, moshel@...lanox.com, eli@...lanox.com
Subject: Re: [PATCH for/net-next 3/8] net/mlx5: Mellanox Connect-IB, core
 driver part 3/3

From: Jack Morgenstein <jackm@....mellanox.co.il>
Date: Mon, 1 Jul 2013 14:44:54 +0300

> On Saturday 29 June 2013 07:10, David Miller wrote:
>> From: Or Gerlitz <ogerlitz@...lanox.com>
>> Date: Wed, 26 Jun 2013 17:22:12 +0300
>> 
>> > +	for (--i; i >= 0; --i) {
>> 
>> Please, "i--" is more canonical in for() loops.
>> 
>> > +	for (--i; i >= 0; --i) {
>> 
>> Likewise.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> Hi Dave,
> 
> For the "for" loop initial value, "i" should be decremented before doing any
> for-loop calculations (and it is not at all obvious if this is the ordering if we use
> i--, and not --i).  Using --i in the initial value makes the ordering obvious.
> However, I do agree with respect to the increment that --i and i-- are logically
> identical.
> 
> Thus, the "for" loop could read:
> 	for (--i; i >= 0; i--) {
> 
> However, my own personal opinion is that this is a bit confusing.
> I would prefer to leave these lines as they are.
> 
> Is that OK with you?

Actually, you should adjust both decrements to read "i--".

Look, if someone doesn't grok that the leftmost decrement happens
before any of the loop body or tests, they don't understand how
for() loops work.

And you're syntax is just confusing people who actually _do_
understand how this part of the C language operates.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ