From 0c8908c411c434eda318b41b4f2a370a1e794831 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 28 May 2008 12:56:36 -0600 Subject: egl: added args string to _eglMain() --- src/egl/main/egldisplay.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/egl/main/egldisplay.c') diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 9c42194c61..b2d30d4274 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -11,25 +11,14 @@ #include "egldriver.h" #include "eglglobals.h" #include "eglhash.h" - - -static char * -my_strdup(const char *s) -{ - if (s) { - int l = strlen(s); - char *s2 = malloc(l + 1); - if (s2) - strcpy(s2, s); - return s2; - } - return NULL; -} +#include "eglstring.h" /** * Allocate a new _EGLDisplay object for the given nativeDisplay handle. * We'll also try to determine the device driver name at this time. + * + * Note that nativeDisplay may be an X Display ptr, or a string. */ _EGLDisplay * _eglNewDisplay(NativeDisplayType nativeDisplay) @@ -46,7 +35,7 @@ _eglNewDisplay(NativeDisplayType nativeDisplay) dpy->Xdpy = (Display *) nativeDisplay; #endif - dpy->DriverName = my_strdup(_eglChooseDriver(dpy)); + dpy->DriverName = _eglstrdup(_eglChooseDriver(dpy)); if (!dpy->DriverName) { free(dpy); return NULL; -- cgit v1.2.3