Quoting sandra koroniewska (2017-06-28 04:47:29)
> "The logic here seems dubious to me. How can the inner if statement ever be
> true,
> given that you've already checked that the extension string is empty or starts
> with 'GL_'?"
>
> Strncmp returns 0 if contents of both strings are equal, so it checks that the
> string does not start with "GL_".
>
> "if (!ext || strncmp(ext, "GL_", 3) || strncmp(ext, "WGL_EXT_swap_control",
> 20)) {
> ...
> }"
>
> So this will not work, because if string begins with "GL_" the third condition
> will be met and PIGLIT_FAIL will be returned.
>
> But you have a point when it comes to the first condition (!ext). I will
> extract this one and check the others after this.
> I will also add a comment about WGL_EXT_swap_control and update the patch.
>
> Thanks,
> SandraAh, I didn't realize that strcmp could return any value other than 0 or > 0, Ilia's suggestion is the correct implementation of what I was getting at. Dylan
signature.asc
Description: signature
_______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
