summaryrefslogtreecommitdiff
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-28 12:56:36 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-28 12:56:36 -0600
commit0c8908c411c434eda318b41b4f2a370a1e794831 (patch)
treed8a1fd0e24383fb3f5e279f33da4c5f8b4c271c5 /src/egl/main/egldisplay.c
parente94d383b9ba7964da9fefac2a55e10c00ee72392 (diff)
egl: added args string to _eglMain()
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c19
1 files changed, 4 insertions, 15 deletions
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;