diff options
author | Matt Turner <[email protected]> | 2014-09-21 21:24:01 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-08 17:02:19 -0800 |
commit | 8af4aaf351313f9d4692697bf28d3c3f84e01ca4 (patch) | |
tree | 3d7fdabf8fc729efef9d011ac583acd0b7ae8e3d /src/mesa/drivers/x11 | |
parent | f0a8bcd84e50468a703a0ac366a4e067610df30c (diff) |
Don't cast the return value of malloc/realloc
See commit 2b7a972e for the Coccinelle script.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index ee05f8aaa3d..33c024a8c07 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -326,8 +326,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, */ xmvis->vishandle = vinfo; /* Allocate more space for additional visual */ - VisualTable = (XMesaVisual *) realloc( VisualTable, - sizeof(XMesaVisual) * (NumVisuals + 1)); + VisualTable = realloc(VisualTable, sizeof(XMesaVisual) * (NumVisuals + 1)); /* add xmvis to the list */ VisualTable[NumVisuals] = xmvis; NumVisuals++; diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 2d66dbdcdf1..b49133b730d 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -783,7 +783,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 = malloc(sizeof(*visinfo)); if(!v->visinfo) { free(v); return NULL; |