From: Yann Dirson Date: Thu, 04 Nov 2010 21:22:04 GMT Subject: Re: [PATCH 1/4] Start to replace locate_rename_dst() with a generic function. Message-ID: <20101104212204.GC8911@home.lan> In-Reply-To: <20101104204555.GA18187@burratino> On Thu, Nov 04, 2010 at 03:45:55PM -0500, Jonathan Nieder wrote: > static struct diff_rename_dst *locate_rename_dst(struct diff_filespec *two, > insert_ok) > { > return locate_element(&rename_dst_nr, &rename_dst_alloc, elem, insert_ok); > } The idea was to deprecate locate_rename_dst() itself and only use locate_element()... > takes more advantage of the compiler's typechecking and looks easy > enough to read. ... but typechecking was something that was worrying me here. Looks like a good idea, after all. > Since this is local to diffcore-rename, I don't mind the locate_element() > name, but if this is to be used more widely I think it would need to be > named more precisely. (find_or_insert_in_array()?) Yes - that's just a prototype. > I guess these parentheses came from search+replace? It's more > readable without them. Right, many of them are superfluous.