changeset 605:a8fa4c550fe5 openvg

use O_ALLOC() to make code clear
author Thinker K.F. Li <thinker@branda.to>
date Sun, 04 Jul 2010 15:39:12 +0800
parents 38514a7c6b26
children e21eb54c7d9c
files src/graph_engine_openvg.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/graph_engine_openvg.c	Sun Jul 04 15:36:40 2010 +0800
+++ b/src/graph_engine_openvg.c	Sun Jul 04 15:39:12 2010 +0800
@@ -264,7 +264,7 @@
     egl_surface = eglCreateWindowSurface(egl_disp, config, drawable,
 					 attrib_list);
 
-    surface = (mbe_surface_t *)malloc(sizeof(mbe_surface_t));
+    surface = O_ALLOC(mbe_surface_t);
     if(surface == NULL) {
 	eglDestroySurface(egl_disp, egl_surface);
 	return NULL;
@@ -304,7 +304,7 @@
     if(surface == EGL_NO_SURFACE)
 	return NULL;
     
-    mbe_surface = (mbe_surface_t *)malloc(sizeof(mbe_surface_t));
+    mbe_surface = O_ALLOC(mbe_surface_t);
     if(mbe_surface == NULL) {
 	eglDestroySurface(display, surface);
 	return NULL;
@@ -338,7 +338,7 @@
 	return NULL;
     }
     
-    canvas = (mbe_t *)malloc(sizeof(mbe_t));
+    canvas = O_ALLOC(mbe_t);
     if(canvas == NULL) {
 	eglDestroyContext(display, ctx);
 	vgDestroyPath(path);