[Mesa-dev] [PATCH 6/9] Use calloc instead of malloc/memset-0
Brian Paul
brianp at vmware.com
Wed Sep 5 07:35:28 PDT 2012
On 09/05/2012 12:42 AM, Matt Turner wrote:
> This patch has been generated by the following Coccinelle semantic
> patch:
>
> @@
> expression E;
> identifier I;
> @@
> - I = malloc(E);
> + I = calloc(1, E);
> ...
> - memset(I, 0, sizeof *I);
> ---
> src/egl/drivers/dri2/egl_dri2.c | 4 +---
> src/egl/drivers/dri2/platform_drm.c | 7 ++-----
> src/egl/drivers/dri2/platform_wayland.c | 4 +---
> src/egl/drivers/dri2/platform_x11.c | 8 ++------
> src/glx/applegl_glx.c | 3 +--
> src/glx/dri2_glx.c | 12 ++++--------
> src/glx/dri_glx.c | 6 ++----
> src/glx/drisw_glx.c | 9 +++------
> src/glx/indirect_glx.c | 6 ++----
> 9 files changed, 18 insertions(+), 41 deletions(-)
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list