summaryrefslogtreecommitdiff
path: root/tests/kms_invalid_mode.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2021-10-05 15:29:35 -0700
committerAshutosh Dixit <ashutosh.dixit@intel.com>2021-10-08 19:16:05 -0700
commit426723f979380f18f9c07d36ebac3a52f760ba7e (patch)
treeeefda917ee9bb1bf8b7aefd8c607f4a0d8f4eabb /tests/kms_invalid_mode.c
parentd5d99d16817eca9ce8d191b6e84c1a1fe2ad4428 (diff)
lib: Typechecking minmax
Add typechecking to the min/max macros and make their locals truly unique-ish to reduce the risk of shadowing. v2: small bug fix, write also height coordinate on rotation test. (jheikkil) v3: Fix up a couple of other max/max_t instances (Ashutosh) Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/kms_invalid_mode.c')
-rw-r--r--tests/kms_invalid_mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
index d4feba32..11960dfd 100644
--- a/tests/kms_invalid_mode.c
+++ b/tests/kms_invalid_mode.c
@@ -195,8 +195,8 @@ test_output(data_t *data)
return 0;
igt_create_fb(data->drm_fd,
- max(mode.hdisplay, 64),
- max(mode.vdisplay, 64),
+ max_t(uint16_t, mode.hdisplay, 64),
+ max_t(uint16_t, mode.vdisplay, 64),
DRM_FORMAT_XRGB8888,
DRM_FORMAT_MOD_NONE,
&fb);