[vlc-devel] [PATCH 1/6] executor: introduce new executor API

Romain Vimont rom1v at videolabs.io
Mon Sep 7 19:42:52 CEST 2020


On Mon, Sep 07, 2020 at 08:23:24PM +0300, Rémi Denis-Courmont wrote:
> Le maanantaina 7. syyskuuta 2020, 20.13.22 EEST Romain Vimont a écrit :
> > > > +    /* Either both prev and next are set, either both are NULL */
> > > > +    assert(!!runnable->node.prev == !!runnable->node.next);
> > > 
> > > You don't need double negation here.
> > 
> > I could write it differently, but I couldn't just remove the double
> > negation (in case prev and next are both non-NULL, but prev != next).
> 
> Sure you need a negation, but I don't see why it needs to be doubled.

Oh yes, sure.

I mechanically use !! to convert a pointer to {0,1}. But here a single
negation is sufficient.


More information about the vlc-devel mailing list