diff options
author | Edward O'Callaghan <[email protected]> | 2015-12-04 22:08:22 +1100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-12-06 17:10:23 +0100 |
commit | 13eb5f596bc8ece3d1805b388aa53917e6158d7b (patch) | |
tree | da4ab5c8fd897b317d7f66004fdd22cd02ebe84c /src/gallium/drivers/svga/svga_cmd.c | |
parent | 150c289f6067cb1ba4572f9124948a94ef94c839 (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 <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_cmd.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c index 0e1e332d6cb..10442cb46e7 100644 --- a/src/gallium/drivers/svga/svga_cmd.c +++ b/src/gallium/drivers/svga/svga_cmd.c @@ -1386,7 +1386,7 @@ SVGA3D_BeginGBQuery(struct svga_winsys_context *swc, SVGA_3D_CMD_BEGIN_GB_QUERY, sizeof *cmd, 1); - if(!cmd) + if (!cmd) return PIPE_ERROR_OUT_OF_MEMORY; cmd->cid = swc->cid; @@ -1466,7 +1466,7 @@ SVGA3D_EndGBQuery(struct svga_winsys_context *swc, SVGA_3D_CMD_END_GB_QUERY, sizeof *cmd, 2); - if(!cmd) + if (!cmd) return PIPE_ERROR_OUT_OF_MEMORY; cmd->cid = swc->cid; @@ -1553,7 +1553,7 @@ SVGA3D_WaitForGBQuery(struct svga_winsys_context *swc, SVGA_3D_CMD_WAIT_FOR_GB_QUERY, sizeof *cmd, 2); - if(!cmd) + if (!cmd) return PIPE_ERROR_OUT_OF_MEMORY; cmd->cid = swc->cid; |