Re: [PATCH v12 01/13] ref-filter: move `struct atom_value` to ref-filter.c
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Aug 19, 2015, 14:56 UTC
- Message-ID
- <vpqy4h72up1.fsf@anie.imag.fr>
- In-Reply-To
- <1439923052-7373-2-git-send-email-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 5 quoted lines
> +static void end_atom_handler(struct atom_value *atomv, struct ref_formatting_state **state)
> +{
> + struct ref_formatting_state *current = *state;
> + if (!current->at_end)
> + die(_("format: `end` atom used without a supporting atom"));You error out on %(end) without %(align), but not on %(align) without %(end).
You should probably check that the stack is empty at the end and error out otherwise.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/