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>
This commit is contained in:
Simon Ser 2022-05-27 17:09:48 +02:00
parent 6c49a8f7e5
commit f33356742e

View File

@ -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);