diff options
author | Eric Engestrom <[email protected]> | 2016-08-15 15:51:21 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-08-24 11:17:05 +0100 |
commit | 8af1b540c52fbc9fe34f1b2fef1f728b205ab630 (patch) | |
tree | d95d4fbc474a92f3aec159440cb303adbc40edd0 /src | |
parent | 253274351f550c428ca4f4f21d9b176579f002ee (diff) |
i915: remove unnecessary `if`
if (x) return true; else return false;
can be simplified as:
return x;
since `x` is already a boolean expression.
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_screen.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 77f03fa8d79..19f7a6a2b90 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -489,9 +489,7 @@ intel_query_image(__DRIimage *image, int attrib, int *value) *value = image->planar_format->components; return true; case __DRI_IMAGE_ATTRIB_FD: - if (drm_intel_bo_gem_export_to_prime(image->region->bo, value) == 0) - return true; - return false; + return !drm_intel_bo_gem_export_to_prime(image->region->bo, value); default: return false; } |