summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/x11/x11_screen.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-11 15:09:24 +0800
committerChia-I Wu <olv@lunarg.com>2010-04-11 17:12:42 +0800
commit870a9d643b1f256e6a379d96a325284dd2f7eeea (patch)
tree1300691f2c4dc9a4426b97fb4a0b60325f24b580 /src/gallium/state_trackers/egl/x11/x11_screen.c
parent5ec4b636c4042fecac6aa0b592e35ed32c4ce5c4 (diff)
st/egl: Follow the portability guide.
Avoid including standard library headers and use MALLOC/FREE if possible.
Diffstat (limited to 'src/gallium/state_trackers/egl/x11/x11_screen.c')
-rw-r--r--src/gallium/state_trackers/egl/x11/x11_screen.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.c b/src/gallium/state_trackers/egl/x11/x11_screen.c
index dd820a369e..6bdff26ec0 100644
--- a/src/gallium/state_trackers/egl/x11/x11_screen.c
+++ b/src/gallium/state_trackers/egl/x11/x11_screen.c
@@ -27,12 +27,11 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <xf86drm.h>
#include <X11/Xlibint.h>
#include <X11/extensions/XShm.h>
+
#include "util/u_memory.h"
-#include "util/u_math.h"
-#include "util/u_format.h"
-#include "xf86drm.h"
#include "egllog.h"
#include "x11_screen.h"
@@ -110,7 +109,7 @@ x11_screen_destroy(struct x11_screen *xscr)
if (xscr->visuals)
XFree(xscr->visuals);
- free(xscr);
+ FREE(xscr);
}
static boolean
@@ -379,7 +378,7 @@ x11_context_modes_create(unsigned count)
next = &base;
for (i = 0; i < count; i++) {
- *next = (__GLcontextModes *) calloc(1, size);
+ *next = (__GLcontextModes *) CALLOC(1, size);
if (*next == NULL) {
x11_context_modes_destroy(base);
base = NULL;
@@ -399,7 +398,7 @@ x11_context_modes_destroy(__GLcontextModes *modes)
{
while (modes != NULL) {
__GLcontextModes *next = modes->next;
- free(modes);
+ FREE(modes);
modes = next;
}
}