Re: [PATCH v2 2/3] pretty.c: capture invalid trailer argument
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jan 29, 2021, 22:28 UTC
- Message-ID
- <CAP8UFD00sdiaFYUvgzQmXKCQSyrNKG82_xXvRGRaqdkbqKu7UQ@mail.gmail.com>
- In-Reply-To
- <245e48eb6835cae4e61f65af780b766d990d4b5f.1611954543.git.gitgitgadget@gmail.com>
On Fri, Jan 29, 2021 at 10:15 PM Hariom Verma via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 7 quoted lines
> > From: Hariom Verma <hariom18599@gmail.com> > > As we would like to use this same logic in ref-filter, it's nice to > get invalid trailer argument. This will allow us to print precise > error message, while using `format_set_trailers_options()` in > ref-filter.
Thanks for continuing to work on this!
Show 8 quoted lines
> {
> for (;;) {
> const char *argval;
> size_t arglen;
>
> + if(**arg == ')') {
> + break;
> + }A space char is missing between "if" and "(". Also no need for "{" and "}". It could just be:
> + if (**arg == ')') > + break;