Re: [PATCH] pack-write: skip *.rev work when not writing *.rev
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Sep 8, 2021, 02:42 UTC
- Message-ID
- <YTgjA/mwH7wY4oyZ@nand.local>
- In-Reply-To
- <CAPUEspgh0kbm-ro13Xt2-g-hPoBMK2-34iP2GvK_gaa2bGC+GQ@mail.gmail.com>
On Tue, Sep 07, 2021 at 06:35:10PM -0700, Carlo Arenas wrote:
Show 9 quoted lines
> On Tue, Sep 7, 2021 at 6:10 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: > > + if (!(flags & WRITE_REV) && !(flags & WRITE_REV_VERIFY)) > > + return NULL; > > I see this expression matches exactly the logic from 8ef50d9958 which > is why I presume > you used it, but the simpler (and logically equivalent[1]) : > > if !((flags & WRITE_REV) || (flags & WRITE_REV_VERIFY))
Even simpler would be:
if (!(flags & (WRITE_REV | WRITE_REV_VERIFY)))
although with optimization flags other than -O0, it seems that each of these three produce the same result [1], so I don't think that it matters much either way ;-).
Thanks, Taylor
[1]: https://godbolt.org/z/fxxhzEz79