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
| ||
|
Date: Mon, 1 Jul 2013 14:44:54 +0300 From: Jack Morgenstein <jackm@....mellanox.co.il> To: David Miller <davem@...emloft.net> 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 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? -Jack -- 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