From 76932e6b0f62ffdfea4d496e9b12fada92760012 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 6 Mar 2020 13:11:41 +0000 Subject: [PATCH] x11: Remove unnecessary NULL checks Output and mode can never be NULL. Signed-off-by: Daniel Stone --- libweston/backend-x11/x11.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libweston/backend-x11/x11.c b/libweston/backend-x11/x11.c index 5fda05685..6d558edb8 100644 --- a/libweston/backend-x11/x11.c +++ b/libweston/backend-x11/x11.c @@ -807,16 +807,6 @@ x11_output_switch_mode(struct weston_output *base, struct weston_mode *mode) static uint32_t values[2]; int ret; - if (base == NULL) { - weston_log("output is NULL.\n"); - return -1; - } - - if (mode == NULL) { - weston_log("mode is NULL.\n"); - return -1; - } - b = to_x11_backend(base->compositor); output = to_x11_output(base);