summaryrefslogtreecommitdiff
path: root/cursor
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-05-27 17:09:48 +0200
committerSimon Ser <contact@emersion.fr>2022-05-27 22:41:11 +0200
commitf33356742e7f89962db6d7f58c3c3c6f9667cd15 (patch)
treeef5693a5a0640a7272f03d8cb4395b8cf9bcfa76 /cursor
parent6c49a8f7e508ad51a913f6205b9359dec8132296 (diff)
downloadwayland-f33356742e7f89962db6d7f58c3c3c6f9667cd15.tar.gz
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 <contact@emersion.fr>
Diffstat (limited to 'cursor')
-rw-r--r--cursor/xcursor.c15
1 files 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);