summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-30 23:02:12 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-30 23:02:45 +0800
commit2c3a23a96f510ee56103b6f6e9308eedd6cd4c4c (patch)
treea61612562c77220900f65594a455d691727d4f12 /src
parent6fc304456e4b5c166efdaac512b2fb285b9f5d7f (diff)
egl: Remove my_strdup.
There is already _eglstrdup for the main library's use.
Diffstat (limited to 'src')
-rw-r--r--src/egl/main/eglmode.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/egl/main/eglmode.c b/src/egl/main/eglmode.c
index 503b9e595e..1e26ea83f5 100644
--- a/src/egl/main/eglmode.c
+++ b/src/egl/main/eglmode.c
@@ -7,27 +7,12 @@
#include "eglmode.h"
#include "eglcurrent.h"
#include "eglscreen.h"
+#include "eglstring.h"
#define MIN2(A, B) (((A) < (B)) ? (A) : (B))
-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;
- }
- else {
- return NULL;
- }
-}
-
-
/**
* Given an EGLModeMESA handle, return the corresponding _EGLMode object
* or null if non-existant.
@@ -81,7 +66,7 @@ _eglAddNewMode(_EGLScreen *screen, EGLint width, EGLint height,
screen->Modes[n].RefreshRate = refreshRate;
screen->Modes[n].Optimal = EGL_FALSE;
screen->Modes[n].Interlaced = EGL_FALSE;
- screen->Modes[n].Name = my_strdup(name);
+ screen->Modes[n].Name = _eglstrdup(name);
screen->NumModes++;
return screen->Modes + n;
}