# HG changeset patch # User Thinker K.F. Li # Date 1278229152 -28800 # Node ID a8fa4c550fe5e952c23f5b83e8facb98c98326ec # Parent 38514a7c6b2615ebff4be2980aeb7d8b37246a49 use O_ALLOC() to make code clear diff -r 38514a7c6b26 -r a8fa4c550fe5 src/graph_engine_openvg.c --- 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);