gallium/drivers: Sanitize NULL checks into canonical form
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>
Fri, 4 Dec 2015 11:08:22 +0000 (22:08 +1100)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 6 Dec 2015 16:10:23 +0000 (17:10 +0100)
commit13eb5f596bc8ece3d1805b388aa53917e6158d7b
treeda4ab5c8fd897b317d7f66004fdd22cd02ebe84c
parent150c289f6067cb1ba4572f9124948a94ef94c839
gallium/drivers: Sanitize NULL checks into canonical form

Use NULL tests of the form `if (ptr)' or `if (!ptr)'.
They do not depend on the definition of the symbol NULL.
Further, they provide the opportunity for the accidental
assignment, are clear and succinct.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
54 files changed:
src/gallium/drivers/i915/i915_context.c
src/gallium/drivers/i915/i915_resource_buffer.c
src/gallium/drivers/i915/i915_resource_texture.c
src/gallium/drivers/llvmpipe/lp_scene.c
src/gallium/drivers/llvmpipe/lp_scene_queue.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_state_gs.c
src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
src/gallium/drivers/llvmpipe/lp_state_setup.c
src/gallium/drivers/llvmpipe/lp_state_vs.c
src/gallium/drivers/noop/noop_pipe.c
src/gallium/drivers/noop/noop_state.c
src/gallium/drivers/nouveau/nouveau_compiler.c
src/gallium/drivers/nouveau/nv50/nv84_video_vp.c
src/gallium/drivers/r300/compiler/r3xx_vertprog.c
src/gallium/drivers/r300/r300_screen_buffer.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r600/compute_memory_pool.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600_state_common.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_query.c
src/gallium/drivers/radeon/r600_texture.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pm4.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_shaders.c
src/gallium/drivers/softpipe/sp_state_shader.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/svga/svga_cmd.c
src/gallium/drivers/svga/svga_context.c
src/gallium/drivers/svga/svga_draw.c
src/gallium/drivers/svga/svga_draw_arrays.c
src/gallium/drivers/svga/svga_draw_elements.c
src/gallium/drivers/svga/svga_pipe_clear.c
src/gallium/drivers/svga/svga_pipe_query.c
src/gallium/drivers/svga/svga_pipe_streamout.c
src/gallium/drivers/svga/svga_resource_buffer.c
src/gallium/drivers/svga/svga_resource_texture.c
src/gallium/drivers/svga/svga_state_constants.c
src/gallium/drivers/svga/svga_state_framebuffer.c
src/gallium/drivers/svga/svga_state_gs.c
src/gallium/drivers/svga/svga_state_tgsi_transform.c
src/gallium/drivers/svga/svga_surface.c
src/gallium/drivers/svga/svga_tgsi.c
src/gallium/drivers/svga/svga_tgsi_vgpu10.c
src/gallium/drivers/vc4/vc4_context.c
src/gallium/drivers/virgl/virgl_buffer.c
src/gallium/drivers/virgl/virgl_context.c
src/gallium/drivers/virgl/virgl_texture.c