Re: [PATCH 06/13] submodule: move core cmd_update() logic to C
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 7, 2021, 12:40 UTC
- Message-ID
- <87wnnslfnz.fsf@evledraar.gmail.com>
- In-Reply-To
- <20210907115932.36068-7-raykar.ath@gmail.com>
On Tue, Sep 07 2021, Atharva Raykar wrote:
Show 7 quoted lines
> struct init_cb {
> const char *prefix;
> + const char *superprefix;
> unsigned int flags;
> };
> -#define INIT_CB_INIT { NULL, 0 }
> +#define INIT_CB_INIT { NULL, NULL, 0 }Since you're doing some cleanup while you're at it, just changing this in some earlier step to:
define INIT_CB_INIT { 0 }Is better, i.e. the NULL-ing out is implicit here. I have an unsubmitted series that does that across the codebase.
> + .references = STRING_LIST_INIT_DUP, \
We do inits here, and append, but it seems nothing clears this string_list.