Hi Pekka, On 28 May 2018 at 09:24, Pekka Paalanen <[email protected]> wrote:
> do not use strstr() for matching extensions strings. It does a > sub-string match, which may not be what you want. What if there was an > extension called "platform_gbm_unixmem" or such? > The substring match is what we want though, as the extension is one of the multiple extensions in the string, and using strstr() seems to be a fairly common practice (in glamor, glx and elsewhere, this is what is in the documentation for EGL_MESA_platform_gbm [1] for example) But yes, you're right, checking for the complete extension name "EGL_MESA_platform_gbm" might be preferable here. Cheers, Olivier. [1] https://www.khronos.org/registry/EGL/extensions/MESA/EGL_MESA_platform_gbm.txt
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
