Re: [PATCH v3 2/3] t0021: implementation the rot13-filter.pl script in C
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 9, 2022, 09:45 UTC
- Message-ID
- <psr5o1r8-ro70-24q1-7o01-8571n1802s18@tzk.qr>
- In-Reply-To
- <CAHd-oW6GLf=4VxAvMy6c9jrGx1zcSHbe_NKbAUg7wvNBPOmEXw@mail.gmail.com>
Hi Matheus,
On Mon, 1 Aug 2022, Matheus Tavares wrote:
Show 14 quoted lines
> On Mon, Aug 1, 2022 at 8:37 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> >
> > On Sun, Jul 31 2022, Matheus Tavares wrote:
> > >
> > > +
> > > + for (i = 0; i < cap_count; i++) {
> > > + if (!strcmp(caps[i], "clean"))
> > > + has_clean_cap = 1;
> > > + else if (!strcmp(caps[i], "smudge"))
> > > + has_smudge_cap = 1;
> >
> > In any case, maybe BUG() in an "else" here with "unknown capability"?
>
> Yup, will do.Please don't, the suggestion is unsound.
The idea here is to find out whether the command-line listed the "clean" and/or the "smudge" capabilities, ignoring all others for the moment.
To error out here with a BUG() would most likely break the invocation in t0021 where we also pass the `delay` capability.
Ciao, Dscho