diff options
| author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2015-12-04 21:26:50 +1100 |
|---|---|---|
| committer | Marek Olšák <marek.olsak@amd.com> | 2015-12-06 17:10:23 +0100 |
| commit | 150c289f6067cb1ba4572f9124948a94ef94c839 (patch) | |
| tree | dd36e1c1546da77b4f539a2256b1f01b8c97936c /src/gallium/auxiliary/draw/draw_context.c | |
| parent | 147fd00bb36917f8463aacd49a26e95ca0926255 (diff) | |
| download | external_mesa3d-150c289f6067cb1ba4572f9124948a94ef94c839.tar.gz external_mesa3d-150c289f6067cb1ba4572f9124948a94ef94c839.tar.bz2 external_mesa3d-150c289f6067cb1ba4572f9124948a94ef94c839.zip | |
gallium/auxiliary: 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/auxiliary/draw/draw_context.c')
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index ee009c1fb7..16a261c14c 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -72,7 +72,7 @@ draw_create_context(struct pipe_context *pipe, void *context, boolean try_llvm) { struct draw_context *draw = CALLOC_STRUCT( draw_context ); - if (draw == NULL) + if (!draw) goto err_out; /* we need correct cpu caps for disabling denorms in draw_vbo() */ |
