From: Derrick Stolee Date: Fri, 09 Apr 2021 19:00:21 GMT Subject: Re: [PATCH v2 1/5] maintenance: simplify prefetch logic Message-ID: <91f3d4f5-429c-8a9e-eea3-a02ced426b7b@gmail.com> In-Reply-To: On 4/7/2021 7:23 PM, Emily Shaffer wrote: > Overall, the series looks pretty solid to me - which is why I've got a > handful of small nits to relay. :) > > On Tue, Apr 06, 2021 at 06:47:46PM +0000, Derrick Stolee via GitGitGadget wrote: >> -static int fetch_remote(const char *remote, struct maintenance_run_opts *opts) >> +static int fetch_remote(struct remote *remote, void *cbdata) >> { >> + struct maintenance_run_opts *opts = cbdata; > [snip] >> if (opts->quiet) > I worry about the lack of null-checking here. If this was a general-purpose method, I'd agree with you. But since this is a static method being called exactly once (and always passing a non-NULL value) then I don't believe that NULL check is valuable here. Thanks, -Stolee