Re: [RFC/PATCHv10 01/11] fast-import: Proper notes tree manipulation
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Dec 8, 2009, 01:59 UTC
- Message-ID
- <20091208015908.GB17588@spearce.org>
- In-Reply-To
- <200912080255.17568.johan@herland.net>
Johan Herland <johan@herland.net> wrote:
Show 9 quoted lines
> On Monday 07 December 2009, Shawn O. Pearce wrote:
> > > + if (fanout >= 20)
> > > + die("Too large fanout (%u)", fanout);
> >
> > Shouldn't convert_num_notes_to_fanout have a guard to prevent this
> > case from happening?
>
> Well, it sort of already does (unless uintmax_t is more than 19 * 8 = 152
> bits wide... ;)Oh, good point. :-)
> Not sure what you're getting at: > > - Should I add a "&& fanout < 19" condition to the while loop in > convert_num_notes_to_fanout()?
That's what I was thinking. But given the 19 * 8 = 152 case above, this is pointless.
-- Shawn.