[virglrenderer-devel] [PATCH] vtest: add support for sending caps v2 (v1.1)

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 28 08:36:11 UTC 2018


Hi Dave,

A couple of small questions/ideas:

On 22 June 2018 at 04:07, Dave Airlie <airlied at gmail.com> wrote:

> +int vtest_send_caps2(void)
...
> +    ret = vtest_block_write(renderer.out_fd, hdr_buf, 8);
> +    if (ret < 0)
> +       goto end;
> +    vtest_block_write(renderer.out_fd, caps_buf, max_size);
> +    if (ret < 0)
> +       goto end;
This if statement is unreachable.

> +
> +end:
> +    free(caps_buf);
> +    return 0;
Did you intentionally meant to return success when the
vtest_block_write calls fail?
I'd imagine the same logic applies to vtest_send_caps as well - might
be worth folding the two at a later point.

HTH
Emil


More information about the virglrenderer-devel mailing list