From: Derrick Stolee Date: Fri, 19 Aug 2022 19:06:23 GMT Subject: Re: [PATCH 5/6] reftable: drop unused parameter from reader_seek_linear() Message-ID: <5f10be7e-424a-ed3b-bb77-75f1e026b2ae@github.com> In-Reply-To: On 8/19/2022 4:54 AM, Jeff King wrote: > The reader code passes around a "struct reftable_reader" context > variable. But the seek function doesn't need it; the table iterator we > already get is sufficient. > > Signed-off-by: Jeff King > --- > One could argue that this is a method of a reftable_reader following the > usual C object-oriented naming conventions, and thus should retain its > first parameter, even if it isn't directly used. > -static int reader_seek_linear(struct reftable_reader *r, struct table_iter *ti, > +static int reader_seek_linear(struct table_iter *ti, > struct reftable_record *want) If we wanted to make it seem more like it was a method of something, it now looks to operate on the table_iter, so the method name could change to something like "table_seek_linear()" which might satisfy both goals. Thanks, -Stolee