From: Jeff King Date: Wed, 10 Feb 2010 17:35:27 GMT Subject: Re: [PATCH] Fix signal handler Message-ID: <20100210173527.GB5091@coredump.intra.peff.net> In-Reply-To: <20100210171406.GE2747@spearce.org> On Wed, Feb 10, 2010 at 09:14:06AM -0800, Shawn O. Pearce wrote: > > + early_output_function = &log_show_early; > ... > > -volatile show_early_output_fn_t show_early_output; > > +sig_atomic_t show_early_output = 0; > > +show_early_output_fn_t early_output_function = NULL; > ... > > + if (show_early_output) { > > + (*early_output_function)(revs, newlist); > > + show_early_output = 0; > > + } > > The function pointer isn't necessary. AFAIK its only called in > this one call site. So you can make a direct reference to the > log_show_early function. I disagree. The original intent was to decrease coupling between the library-like revision walker and the actual log command. We aren't using that flexibility now, but I don't see any reason to decrease it (especially since it is so easy to keep it). -Peff