From f33356742e7f89962db6d7f58c3c3c6f9667cd15 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 27 May 2022 17:09:48 +0200 Subject: [PATCH] cursor: remove unnecessary ifs in xcursor_load_theme load_all_cursors_from_dir and xcursor_theme_inherits already have the NULL checks we want. Signed-off-by: Simon Ser --- cursor/xcursor.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cursor/xcursor.c b/cursor/xcursor.c index dcebaee..2caa2d6 100644 --- a/cursor/xcursor.c +++ b/cursor/xcursor.c @@ -818,19 +818,14 @@ xcursor_load_theme(const char *theme, int size, continue; full = xcursor_build_fullname(dir, "cursors", ""); - - if (full) { - load_all_cursors_from_dir(full, size, load_callback, - user_data); - free(full); - } + load_all_cursors_from_dir(full, size, load_callback, + user_data); + free(full); if (!inherits) { full = xcursor_build_fullname(dir, "", "index.theme"); - if (full) { - inherits = xcursor_theme_inherits(full); - free(full); - } + inherits = xcursor_theme_inherits(full); + free(full); } free(dir);