From aa32d1a12739bd71ede114e9a65a642c27fe07ce Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 25 Dec 2023 18:54:11 +0100 Subject: [PATCH] session-lock-v1: drop negative buffer size checks The buffer size will never be negative, and the negative checks are distracting from the real checks here. --- types/wlr_session_lock_v1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/wlr_session_lock_v1.c b/types/wlr_session_lock_v1.c index b2c297ed..1979e7e4 100644 --- a/types/wlr_session_lock_v1.c +++ b/types/wlr_session_lock_v1.c @@ -170,8 +170,7 @@ static void lock_surface_role_commit(struct wlr_surface *surface) { return; } - if (surface->current.width < 0 || surface->current.height < 0 || - (uint32_t)surface->current.width != lock_surface->pending.width || + if ((uint32_t)surface->current.width != lock_surface->pending.width || (uint32_t)surface->current.height != lock_surface->pending.height) { wl_resource_post_error(lock_surface->resource, EXT_SESSION_LOCK_SURFACE_V1_ERROR_DIMENSIONS_MISMATCH,