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; continue;
full = xcursor_build_fullname(dir, "cursors", ""); full = xcursor_build_fullname(dir, "cursors", "");
load_all_cursors_from_dir(full, size, load_callback,
if (full) { user_data);
load_all_cursors_from_dir(full, size, load_callback, free(full);
user_data);
free(full);
}
if (!inherits) { if (!inherits) {
full = xcursor_build_fullname(dir, "", "index.theme"); full = xcursor_build_fullname(dir, "", "index.theme");
if (full) { inherits = xcursor_theme_inherits(full);
inherits = xcursor_theme_inherits(full); free(full);
free(full);
}
} }
free(dir); free(dir);