From 6ebe3cfed0aaa934cd571d2b89c0ba23aa242055 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 5 Aug 2021 18:09:53 +0200 Subject: [PATCH] cursor: remove unused wl_cursor_theme.name Let's just delete this field since it's not used anywhere and not exposed in our public API. Signed-off-by: Simon Ser --- cursor/wayland-cursor.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c index 55c62eeb..b3495e0c 100644 --- a/cursor/wayland-cursor.c +++ b/cursor/wayland-cursor.c @@ -129,7 +129,6 @@ struct wl_cursor_theme { struct wl_cursor **cursors; struct wl_shm *shm; struct shm_pool *pool; - char *name; int size; }; @@ -256,9 +255,6 @@ load_fallback_theme(struct wl_cursor_theme *theme) { uint32_t i; - free(theme->name); - theme->name = strdup("default"); - theme->cursor_count = ARRAY_LENGTH(cursor_metadata); theme->cursors = malloc(theme->cursor_count * sizeof(*theme->cursors)); @@ -391,9 +387,6 @@ wl_cursor_theme_load(const char *name, int size, struct wl_shm *shm) if (!name) name = "default"; - theme->name = strdup(name); - if (!theme->name) - goto out_error_name; theme->size = size; theme->cursor_count = 0; theme->cursors = NULL; @@ -413,8 +406,6 @@ wl_cursor_theme_load(const char *name, int size, struct wl_shm *shm) return theme; out_error_pool: - free(theme->name); -out_error_name: free(theme); return NULL; } @@ -433,7 +424,6 @@ wl_cursor_theme_destroy(struct wl_cursor_theme *theme) shm_pool_destroy(theme->pool); - free(theme->name); free(theme->cursors); free(theme); }