[Mesa-dev] [PATCH mesa 2/2] egl: turn one more boolean `int` into a `bool`

Emil Velikov emil.l.velikov at gmail.com
Tue Jun 20 07:38:17 UTC 2017


On 19 June 2017 at 00:49, Eric Engestrom <eric at engestrom.ch> wrote:
> Same as the previous commit, but this one was split out because it's
> a bit more complicated: this field is given as a pointer to a function,
> so the function had to be changed as well, and the function was use in
> a bunch of places, which needed updating as well.
>
Agreed. Thank you for this.

> @@ -220,7 +220,7 @@ drm_create_adapter( int fd,
>       * takes ownership of it. */
>      fd = loader_get_user_preferred_fd(fd, &different_device);
>      ctx->fd = fd;
> -    ctx->base.linear_framebuffer = !!different_device;
> +    ctx->base.linear_framebuffer = different_device;
>
>      if (!pipe_loader_drm_probe_fd(&ctx->dev, fd)) {
>          ERR("Failed to probe drm fd %d.\n", fd);
> @@ -271,7 +271,7 @@ drm_create_adapter( int fd,
>      if (driCheckOption(&userInitOptions, "thread_submit", DRI_BOOL))
>          ctx->base.thread_submit = driQueryOptionb(&userInitOptions, "thread_submit");
>      else
> -        ctx->base.thread_submit = !!different_device;
> +        ctx->base.thread_submit = different_device;
>
thread_submit and linear_framebuffer are BOOL aka int, although
everything should be fine.

Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the mesa-dev mailing list