Re: [PATCH v2 1/7] remote-curl: pass "struct strvec *" instead of int/char ** pair
- From
Carlo Arenas <carenas@gmail.com>
- Date
- Sep 12, 2021, 00:36 UTC
- Message-ID
- <CAPUEspizWWigu4yb_fK1kmzJDx7G0JUOFmRsAfaKeuvTPrk4bA@mail.gmail.com>
- In-Reply-To
- <patch-v2-1.7-2ef48d734e8-20210912T001420Z-avarab@gmail.com>
On Sat, Sep 11, 2021 at 5:16 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> > We'll be changing the "int nr" in the "struct strvec" to "int size_t"
Did you mean "size_t nr"?
Show 6 quoted lines
> -static int push_git(struct discovery *heads, int nr_spec, const char **specs)
> +static int push_git(struct discovery *heads, struct strvec *specs)
> {
> struct rpc_state rpc;
> - int i, err;
> + int i;you are already splitting them, why not then change 'i' also to be a size_t?
Carlo