summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-12-04 22:08:22 +1100
committerMarek Olšák <marek.olsak@amd.com>2015-12-06 17:10:23 +0100
commit13eb5f596bc8ece3d1805b388aa53917e6158d7b (patch)
treeda4ab5c8fd897b317d7f66004fdd22cd02ebe84c /src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
parent150c289f6067cb1ba4572f9124948a94ef94c839 (diff)
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>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_rasterizer.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_rasterizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
index 94ebf8ffff..ef6958d99f 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
@@ -64,7 +64,7 @@ llvmpipe_create_rasterizer_state(struct pipe_context *pipe,
* handle, and what we'll look after ourselves.
*/
struct lp_rast_state *state = MALLOC_STRUCT(lp_rast_state);
- if (state == NULL)
+ if (!state)
return NULL;
memcpy(&state->draw_state, rast, sizeof *rast);