Re: [PATCH] fetch: download bundles once, even with --all
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
>> + if (!uri || !*uri) {
>> + result = 0;
>> + goto cleanup;
>> + }
>
> Coverity flagged this "!uri"; it can never be true since we
> unconditionally xstrdup(uri) at the top of the function, and we'd
> segfault in that case.
>
> I think the existing code that assumes a non-NULL uri is reasonable.
> Even before the xstrdup() we'd have segfaulted when it was handed to
> fetch_bundle_uri_internal().
>
> It's not a huge deal, in the sense that you're just being overly
> defensive, but the comment and conditional here are a little misleading.Nice. Thanks for commenting on what you spotted.