Re: [PATCH v3 2/3] t0021: implementation the rot13-filter.pl script in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matheus,

On Mon, 1 Aug 2022, Matheus Tavares wrote:

> On Mon, Aug 1, 2022 at 8:37 AM Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux