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/drmmode_display.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/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 003fe51e..3117b8f1 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -386,7 +386,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, return pixmap; fbcon = drmModeGetFB(pRADEONEnt->fd, fbcon_id); - if (fbcon == NULL) + if (!fbcon) return NULL; if (fbcon->depth != pScrn->depth || @@ -410,7 +410,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, bo->ref_count = 1; bo->bo.radeon = radeon_bo_open(drmmode->bufmgr, flink.name, 0, 0, 0, 0); - if (bo == NULL) { + if (!bo) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't open BO for fbcon handle\n"); goto out_free_fb; @@ -1365,7 +1365,7 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res RADEONInfoPtr info = RADEONPTR(pScrn); crtc = xf86CrtcCreate(pScrn, &info->drmmode_crtc_funcs); - if (crtc == NULL) + if (!crtc) return 0; drmmode_crtc = xnfcalloc(sizeof(drmmode_crtc_private_rec), 1); @@ -2317,7 +2317,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) if (radeon_bo_map(info->front_buffer->bo.radeon, 1)) goto fail; fb_shadow = calloc(1, pitch * scrn->virtualY); - if (fb_shadow == NULL) + if (!fb_shadow) goto fail; free(info->fb_shadow); info->fb_shadow = fb_shadow; |