_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
- if (asprintf(&get_extensions_name, "%s_%s",
- __DRI_DRIVER_GET_EXTENSIONS, dri2_dpy->driver_name) != -1) {
+ get_extensions_name = dri_get_extensions_name(dri2_dpy->driver_name);
+
+ if (get_extensions_name) {
get_extensions = dlsym(dri2_dpy->driver, get_extensions_name);
if (get_extensions) {
extensions = get_extensions();
return NULL;
}
- if (asprintf(&get_extensions_name, "%s_%s",
- __DRI_DRIVER_GET_EXTENSIONS, dri->base.driver_name) != -1) {
+ get_extensions_name = dri_get_extensions_name(dri->base.driver_name);
+
+ if (get_extensions_name) {
const __DRIextension **(*get_extensions)(void);
get_extensions = dlsym(dri->driver, get_extensions_name);
{
const __DRIextension **extensions = NULL;
const __DRIextension **(*get_extensions)(void);
- char *get_extensions_name;
+ char *get_extensions_name = dri_get_extensions_name(driver_name);
- if (asprintf(&get_extensions_name, "%s_%s",
- __DRI_DRIVER_GET_EXTENSIONS, driver_name) != -1) {
+ if (get_extensions_name) {
get_extensions = dlsym(handle, get_extensions_name);
if (get_extensions) {
free(get_extensions_name);