On Tue, Sep 30, 2025 at 08:25:06AM +0200, Vegard Nossum wrote:
> On 30/09/2025 06:53, Kees Cook wrote:
> > [...]
> > +                   if (sym->type == S_BOOLEAN || sym->type == S_TRISTATE)
> > +                           sym->def[S_DEF_USER].tri = newval.tri;
> > +                   else
> > +                           sym->def[S_DEF_USER].val = newval.val;
> 
> sym->def[S_DEF_USER] and newval are both 'struct symbol_value', can we
> just unconditionally do this instead?
> 
>     sym->def[S_DEF_USER] = newval;

Argh, yes. I even went and looked at that struct to see if tri and val
were a union and my brain didn't get to the next step. :P

I'll update this.

> I have to run, will take a closer look later. Thanks,

Thanks!

-- 
Kees Cook

Reply via email to