summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/postprocess/pp_mlaa.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-12-04 21:26:50 +1100
committerMarek Olšák <marek.olsak@amd.com>2015-12-06 17:10:23 +0100
commit150c289f6067cb1ba4572f9124948a94ef94c839 (patch)
treedd36e1c1546da77b4f539a2256b1f01b8c97936c /src/gallium/auxiliary/postprocess/pp_mlaa.c
parent147fd00bb36917f8463aacd49a26e95ca0926255 (diff)
downloadexternal_mesa3d-150c289f6067cb1ba4572f9124948a94ef94c839.zip
external_mesa3d-150c289f6067cb1ba4572f9124948a94ef94c839.tar.gz
external_mesa3d-150c289f6067cb1ba4572f9124948a94ef94c839.tar.bz2
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/postprocess/pp_mlaa.c')
-rw-r--r--src/gallium/auxiliary/postprocess/pp_mlaa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_mlaa.c b/src/gallium/auxiliary/postprocess/pp_mlaa.c
index 024a248..a3f58b5 100644
--- a/src/gallium/auxiliary/postprocess/pp_mlaa.c
+++ b/src/gallium/auxiliary/postprocess/pp_mlaa.c
@@ -238,7 +238,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n,
tmp_text = CALLOC(sizeof(blend2fs_1) + sizeof(blend2fs_2) +
IMM_SPACE, sizeof(char));
- if (tmp_text == NULL) {
+ if (!tmp_text) {
pp_debug("Failed to allocate shader space\n");
return FALSE;
}