Il giorno dom 5 set 2021 alle ore 21:40 Denys Vlasenko
<vda.li...@googlemail.com> ha scritto:
>
> On Sun, Sep 5, 2021 at 5:53 PM Roberto A. Foglietta
> <roberto.foglie...@gmail.com> wrote:
> > Il giorno dom 5 set 2021 alle ore 17:03 Denys Vlasenko
> > <vda.li...@googlemail.com> ha scritto:
> >
> > > @@ -468,7 +470,11 @@ struct globals_misc {
> > >         /* indicates specified signal received */
> > >         uint8_t gotsig[NSIG - 1]; /* offset by 1: "signal" 0 is 
> > > meaningless */
> > >         uint8_t may_have_traps; /* 0: definitely no traps are set, 1: 
> > > some traps may be set */
> > > -       char *trap[NSIG];
> > > +       char *trap[NSIG + 1];
> > > +/* trap[0] is EXIT trap, trap[NTRAP_ERR] is ERR trap, other trap[i] are 
> > > signal traps */
> > > +#define NTRAP_ERR  NSIG
> > > +#define NTRAP_LAST NSIG
> >
> > If NTRAP_LAST is defined as NSIG + 1 then char *trap[NSIG + 1]; could
> > become trap[NTRAP_LAST].
>
> If NTRAP_LAST is defined as NSIG + 1, then its name would be lying to people
> reading the code: it says "the last trap number", but it would actually mean
> "the number of existing traps".
>

I see your point.
I replaced NLAST with NTRAPS in my v021 patch.
I also removed extra tabulation which I forgot to fix.

Thanks,
-- 
Roberto A. Foglietta
+39.349.33.30.697
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to