aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorEdward O'Callaghan <[email protected]>2015-12-04 21:26:50 +1100
committerMarek Olšák <[email protected]>2015-12-06 17:10:23 +0100
commit150c289f6067cb1ba4572f9124948a94ef94c839 (patch)
treedd36e1c1546da77b4f539a2256b1f01b8c97936c /src/gallium/auxiliary/vl
parent147fd00bb36917f8463aacd49a26e95ca0926255 (diff)
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 <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_decoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 9d0e4a1eae0..f5bb3a0106f 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -542,7 +542,7 @@ vl_mpeg12_get_decode_buffer(struct vl_mpeg12_decoder *dec, struct pipe_video_buf
return buffer;
buffer = CALLOC_STRUCT(vl_mpeg12_buffer);
- if (buffer == NULL)
+ if (!buffer)
return NULL;
if (!vl_vb_init(&buffer->vertex_stream, dec->context,