diff options
author | Edward O'Callaghan <[email protected]> | 2015-12-04 21:26:50 +1100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-12-06 17:10:23 +0100 |
commit | 150c289f6067cb1ba4572f9124948a94ef94c839 (patch) | |
tree | dd36e1c1546da77b4f539a2256b1f01b8c97936c /src/gallium/auxiliary/postprocess/pp_run.c | |
parent | 147fd00bb36917f8463aacd49a26e95ca0926255 (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/postprocess/pp_run.c')
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_run.c b/src/gallium/auxiliary/postprocess/pp_run.c index caa2062f4cf..c6c7b88eea3 100644 --- a/src/gallium/auxiliary/postprocess/pp_run.c +++ b/src/gallium/auxiliary/postprocess/pp_run.c @@ -262,7 +262,7 @@ pp_tgsi_to_state(struct pipe_context *pipe, const char *text, bool isvs, */ tokens = tgsi_alloc_tokens(PP_MAX_TOKENS); - if (tokens == NULL) { + if (!tokens) { pp_debug("Failed to allocate temporary token storage.\n"); return NULL; } |