From 702625f02879264c0bdec889ecde00812dfd016a Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Sat, 20 Sep 2025 18:23:02 +0300 Subject: [PATCH] modesetting: use `MAX` macro in more places Signed-off-by: stefan11111 --- hw/xfree86/drivers/video/modesetting/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/drivers/video/modesetting/drmmode_display.c b/hw/xfree86/drivers/video/modesetting/drmmode_display.c index 8ea4f0ffdc..43b84da500 100644 --- a/hw/xfree86/drivers/video/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/video/modesetting/drmmode_display.c @@ -1852,7 +1852,7 @@ drmmode_cursor_get_pitch(drmmode_crtc_private_ptr drmmode_crtc, int idx) struct dumb_bo *bo = dumb_bo_create(drmmode->fd, width, height, drmmode->kbpp); if (!bo) { /* We couldn't allocate a bo, so we try to guess the pitch */ - return width > 64 ? width : 64; + return MAX(width, 64); } ret = bo->pitch / drmmode->cpp; @@ -1870,7 +1870,7 @@ drmmode_cursor_get_pitch(drmmode_crtc_private_ptr drmmode_crtc, int idx) struct dumb_bo *bo = dumb_bo_create(drmmode->fd, width, height, drmmode->kbpp); if (!bo) { /* We couldn't allocate a bo, so we try to guess the pitch */ - return width > 64 ? width : 64; + return MAX(width, 64); } drmmode_crtc->cursor_pitches[idx] = bo->pitch / drmmode->cpp;