From 0c73a3b7d0cceb4ba06274b7bd3cf50fb73d48f1 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 9 Nov 2016 15:50:06 +0100 Subject: dri: make use of loader_get_extensions_name(..) helper Changes since v1: - removed not needed includes - use the loader version of the helper v2 [Emil Velikov] - Keep the includes - they are required. Signed-off-by: Christian Gmeiner Signed-off-by: Emil Velikov --- src/glx/dri_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/glx/dri_common.c') diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 6728d38fa0a..854733a5bea 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -161,10 +161,9 @@ driGetDriverExtensions(void *handle, const char *driver_name) { const __DRIextension **extensions = NULL; const __DRIextension **(*get_extensions)(void); - char *get_extensions_name; + char *get_extensions_name = loader_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); -- cgit v1.2.3