Don't cast the return value of malloc/realloc
authorMatt Turner <mattst88@gmail.com>
Tue, 4 Sep 2012 02:44:00 +0000 (19:44 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 6 Sep 2012 05:28:50 +0000 (22:28 -0700)
commit2b7a972e3f36bfcdc6fbe2b59d7ffdcde49c9405
tree4b9504b4799e9d29363690fb9083ac4bbcf78d51
parent812931f602ff913a51a608a9b1b6826b7f2bfae0
Don't cast the return value of malloc/realloc

This patch has been generated by the following Coccinelle semantic
patch:

// Don't cast the return value of malloc/realloc.
//
// Casting the return value of malloc/realloc only stands to hide
// errors.

@@
type T;
expression E1, E2;
@@
- (T)
(
_mesa_align_calloc(E1, E2)
|
_mesa_align_malloc(E1, E2)
|
calloc(E1, E2)
|
malloc(E1)
|
realloc(E1, E2)
)
93 files changed:
src/egl/main/eglcurrent.c
src/egl/main/egldisplay.c
src/egl/main/eglmode.c
src/egl/main/eglscreen.c
src/gallium/drivers/r300/compiler/memory_pool.c
src/gallium/drivers/r300/r300_cb.h
src/gallium/drivers/r600/compute_memory_pool.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/state_trackers/egl/x11/glxinit.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/vega/api_filters.c
src/gallium/state_trackers/vega/polygon.c
src/gallium/state_trackers/vega/shaders_cache.c
src/gallium/winsys/radeon/drm/radeon_drm_cs.c
src/glx/XF86dri.c
src/glx/clientattrib.c
src/glx/glx_pbuffer.c
src/glx/glx_query.c
src/glx/glxcmds.c
src/glx/glxconfig.c
src/glx/indirect_glx.c
src/glx/render2.c
src/glx/renderpix.c
src/glx/singlepix.c
src/glx/xfont.c
src/mapi/glapi/glapi_getproc.c
src/mesa/drivers/common/meta.c
src/mesa/drivers/dri/i965/brw_state_cache.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_sanity.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/drivers/dri/radeon/radeon_queryobj.h
src/mesa/drivers/dri/radeon/radeon_sanity.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/windows/gdi/wgl.c
src/mesa/drivers/windows/gdi/wmesa.c
src/mesa/drivers/x11/fakeglx.c
src/mesa/drivers/x11/glxapi.c
src/mesa/drivers/x11/xfonts.c
src/mesa/drivers/x11/xm_api.c
src/mesa/drivers/x11/xm_buffer.c
src/mesa/main/accum.c
src/mesa/main/atifragshader.c
src/mesa/main/attrib.c
src/mesa/main/context.c
src/mesa/main/cpuinfo.c
src/mesa/main/debug.c
src/mesa/main/dlist.c
src/mesa/main/eval.c
src/mesa/main/extensions.c
src/mesa/main/format_unpack.c
src/mesa/main/imports.c
src/mesa/main/matrix.c
src/mesa/main/mipmap.c
src/mesa/main/mm.c
src/mesa/main/pack.c
src/mesa/main/readpix.c
src/mesa/main/shaderapi.c
src/mesa/main/texcompress_cpal.c
src/mesa/main/texgetimage.c
src/mesa/main/texstore.c
src/mesa/main/transformfeedback.c
src/mesa/main/uniforms.c
src/mesa/main/version.c
src/mesa/main/vsnprintf.c
src/mesa/math/m_debug_norm.c
src/mesa/math/m_debug_xform.c
src/mesa/math/m_matrix.c
src/mesa/program/nvfragparse.c
src/mesa/program/nvvertparse.c
src/mesa/program/prog_cache.c
src/mesa/program/prog_instruction.c
src/mesa/program/prog_optimize.c
src/mesa/program/program.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/swrast/s_context.c
src/mesa/swrast/s_copypix.c
src/mesa/swrast/s_depth.c
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_texcombine.c
src/mesa/swrast/s_texfilter.c
src/mesa/swrast/s_texture.c
src/mesa/swrast/s_zoom.c
src/mesa/swrast_setup/ss_context.c
src/mesa/tnl/t_context.c
src/mesa/tnl/t_vb_program.c
src/mesa/tnl/t_vb_texgen.c
src/mesa/tnl/t_vb_vertex.c
src/mesa/tnl/t_vertex.c
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_primitive_restart.c
src/mesa/vbo/vbo_rebase.c