aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-12-25 18:54:11 +0100
committerSimon Ser <contact@emersion.fr>2023-12-25 18:54:11 +0100
commitaa32d1a12739bd71ede114e9a65a642c27fe07ce (patch)
tree14de3a129b73047a0060d80b7a84c8c7610615a7
parentdc3b2b9439fda14e8fd7e64a9e9a13ae29b6acd2 (diff)
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.
-rw-r--r--types/wlr_session_lock_v1.c3
1 files changed, 1 insertions, 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,