summaryrefslogtreecommitdiff
path: root/src/radeon_textured_video.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-07-11 18:42:58 +0200
committerMichel Dänzer <michel@daenzer.net>2018-07-12 18:08:34 +0200
commit4050b0ad51b1c65945c6474981d1228888738cd4 (patch)
tree4047304beafbede53d2c3e54008f0464130fd0fd /src/radeon_textured_video.c
parentcf8bc72e3473cef2b511e2c938eb00aca82de909 (diff)
Replace 'foo == NULL' with '!foo'
Shorter and sweeter. :) (Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613) Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_textured_video.c')
-rw-r--r--src/radeon_textured_video.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 23bdfd1d..be71e408 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -153,7 +153,7 @@ radeon_allocate_video_bo(ScrnInfoPtr pScrn,
static void
RADEONFreeVideoMemory(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
{
- if (pPriv->video_memory != NULL) {
+ if (pPriv->video_memory) {
radeon_bo_unref(pPriv->video_memory);
pPriv->video_memory = NULL;
@@ -312,7 +312,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
RADEONFreeVideoMemory(pScrn, pPriv);
}
- if (pPriv->video_memory == NULL) {
+ if (!pPriv->video_memory) {
Bool ret;
ret = radeon_allocate_video_bo(pScrn,
&pPriv->video_memory,
@@ -329,7 +329,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
/* Bicubic filter loading */
if (pPriv->bicubic_enabled) {
- if (info->bicubic_bo == NULL)
+ if (!info->bicubic_bo)
pPriv->bicubic_enabled = FALSE;
}
@@ -725,7 +725,7 @@ static void radeon_unload_bicubic_texture(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
- if (info->bicubic_memory != NULL) {
+ if (info->bicubic_memory) {
radeon_bo_unref(info->bicubic_memory);
info->bicubic_memory = NULL;
}
@@ -827,7 +827,7 @@ RADEONSetupImageTexturedVideo(ScreenPtr pScreen)
adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + num_texture_ports *
(sizeof(RADEONPortPrivRec) + sizeof(DevUnion)));
- if (adapt == NULL)
+ if (!adapt)
return NULL;
xvBicubic = MAKE_ATOM("XV_BICUBIC");