[Mesa-dev] [PATCH] dri: use 'bool' instead 'int' for boolean variables

Eric Engestrom eric.engestrom at imgtec.com
Tue Aug 2 16:14:50 UTC 2016


On Mon, Aug 01, 2016 at 03:43:17PM +0200, ⚛ wrote:
> On Mon, Aug 1, 2016 at 2:46 PM, Eric Engestrom
> <eric.engestrom at imgtec.com> wrote:
> > On Sun, Jul 31, 2016 at 05:49:02PM +0200, Jan Ziak wrote:
> >> Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0x9b at gmail.com>
> >
> > This is a good change, and with a couple things to fix below, it is:
> > Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> >
> >> +#include <stdbool.h>
> >
> > You should add this include to all the files that need it, instead of
> > relying on it to be included by some other include.
> 
> Done.
> 
> >> +   pdp->hasPresent = true;
> >
> > This is a bugfix, unrelated to this refactoring. It should be its own patch.
> > However, I'm not positive it is correct, so it doesn't get my r-b (yet).
> 
> I removed the "pdp->hasPresent = true". The change from "int
> hasPresent" to "bool hasPresent" is still in the patch.
> 
> grep -R "\<hasPresent\>" shows that the field isn't used anywhere.

Indeed, I guess the field should be removed, but that should be another patch.
Your latest version looks good; I'll look at it again, and r-b it :)

Cheers,
  Eric


More information about the mesa-dev mailing list