diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-07-11 18:42:58 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-07-12 18:08:34 +0200 |
commit | 4050b0ad51b1c65945c6474981d1228888738cd4 (patch) | |
tree | 4047304beafbede53d2c3e54008f0464130fd0fd /src/radeon_video.c | |
parent | cf8bc72e3473cef2b511e2c938eb00aca82de909 (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_video.c')
-rw-r--r-- | src/radeon_video.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index e08d8e00..fc321184 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -144,7 +144,7 @@ void RADEONInitVideo(ScreenPtr pScreen) num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); newAdaptors = malloc((num_adaptors + 2) * sizeof(*newAdaptors)); - if (newAdaptors == NULL) + if (!newAdaptors) return; memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); @@ -152,7 +152,7 @@ void RADEONInitVideo(ScreenPtr pScreen) if (info->use_glamor) { texturedAdaptor = radeon_glamor_xv_init(pScreen, 16); - if (texturedAdaptor != NULL) { + if (texturedAdaptor) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video (glamor)\n"); } else @@ -161,7 +161,7 @@ void RADEONInitVideo(ScreenPtr pScreen) || (info->directRenderingEnabled) ) { texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen); - if (texturedAdaptor != NULL) { + if (texturedAdaptor) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video\n"); } else |