From 33bb8c051df3f2561c7b4a5ad7abefa3fce99d37 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 1 Sep 2012 07:47:24 -0600 Subject: mesa: s/MALLOC/malloc/ v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- src/mesa/drivers/x11/xfonts.c | 2 +- src/mesa/drivers/x11/xm_api.c | 4 ++-- src/mesa/drivers/x11/xm_buffer.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xfonts.c b/src/mesa/drivers/x11/xfonts.c index 91f819b8df2..ac275bb6aef 100644 --- a/src/mesa/drivers/x11/xfonts.c +++ b/src/mesa/drivers/x11/xfonts.c @@ -247,7 +247,7 @@ Fake_glXUseXFont(Font font, int first, int count, int listbase) max_bm_width = (max_width + 7) / 8; max_bm_height = max_height; - bm = (GLubyte *) MALLOC((max_bm_width * max_bm_height) * sizeof(GLubyte)); + bm = (GLubyte *) malloc((max_bm_width * max_bm_height) * sizeof(GLubyte)); if (!bm) { XFreeFontInfo(NULL, fs, 1); _mesa_error(NULL, GL_OUT_OF_MEMORY, diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 249bbdf9a40..6696f70f5b8 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -171,7 +171,7 @@ bits_per_pixel( XMesaVisual xmv ) /* Create a temporary XImage */ img = XCreateImage( dpy, visinfo->visual, visinfo->depth, ZPixmap, 0, /*format, offset*/ - (char*) MALLOC(8), /*data*/ + (char*) malloc(8), /*data*/ 1, 1, /*width, height*/ 32, /*bitmap_pad*/ 0 /*bytes_per_line*/ @@ -781,7 +781,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, * the struct but we may need some of the information contained in it * at a later time. */ - v->visinfo = (XVisualInfo *) MALLOC(sizeof(*visinfo)); + v->visinfo = (XVisualInfo *) malloc(sizeof(*visinfo)); if(!v->visinfo) { free(v); return NULL; diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index eb68f940f89..242b6de4c26 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -203,7 +203,7 @@ alloc_back_buffer(XMesaBuffer b, GLuint width, GLuint height) _mesa_warning(NULL, "alloc_back_buffer: XCreateImage failed.\n"); return; } - b->backxrb->ximage->data = (char *) MALLOC(b->backxrb->ximage->height + b->backxrb->ximage->data = (char *) malloc(b->backxrb->ximage->height * b->backxrb->ximage->bytes_per_line); if (!b->backxrb->ximage->data) { _mesa_warning(NULL, "alloc_back_buffer: MALLOC failed.\n"); -- cgit v1.2.3