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: Wed, 7 Dec 2022 19:41:28 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Dan Carpenter' <error27@...il.com>, Vladimir Oltean <olteanv@...il.com> CC: "David S. Miller" <davem@...emloft.net>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org> Subject: RE: [PATCH net] lib: packing: fix shift wrapping in bit_reverse() From: Dan Carpenter > Sent: 07 December 2022 12:21 .... > > > - new_val |= (bit << (width - i - 1)); > > > + if (val & BIT_ULL(1)) > > > > hmm, why 1 and not i? > > Because I'm a moron. Let me resend. Since we're not writing FORTRAN-IV why not use a variable name that is harder to confuse with 1? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
Powered by blists - more mailing lists