Re: [PATCH 3/8] commit-graph.c: peel refs in 'add_ref_to_set'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 13, 2020 at 01:48:48PM -0600, Taylor Blau wrote:

> > Alternatively, you could do this without a struct copy at all with:
> >
> >   if (!peel_ref(...))
> >          oid = peeled;
> >   oidset_insert(..., oid);
> >
> > which is actually a bit cheaper.
> 
> Makes sense, I think this version is the better of the two that you
> suggested here. I noticed one small thing which is that since peeled is
> only on the stack, I think we actually want 'oid = &peeled', but
> otherwise I took this as-is.

Yes, definitely. That's what I get for writing code in my email editor. :)

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux