From: Shawn O. Pearce Date: Tue, 08 Dec 2009 01:59:08 GMT Subject: Re: [RFC/PATCHv10 01/11] fast-import: Proper notes tree manipulation Message-ID: <20091208015908.GB17588@spearce.org> In-Reply-To: <200912080255.17568.johan@herland.net> Johan Herland wrote: > 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.