From 6f098663c0380d63eaf19e61b47b3e979f6ef7bc Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Wed, 17 Apr 2019 13:50:28 +0300 Subject: [PATCH] weston-debug: Remove weston_compositor from weston_log_context This is no longer needed. Also assert if the context passed is NULL and compositor log context is already set. Signed-off-by: Marius Vlad --- libweston/weston-debug.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libweston/weston-debug.c b/libweston/weston-debug.c index b18d596f..79b35a45 100644 --- a/libweston/weston-debug.c +++ b/libweston/weston-debug.c @@ -46,7 +46,6 @@ * \internal */ struct weston_log_context { - struct weston_compositor *compositor; struct wl_listener compositor_destroy_listener; struct wl_global *global; struct wl_list scope_list; /**< weston_log_scope::compositor_link */ @@ -266,12 +265,10 @@ int weston_log_ctx_compositor_setup(struct weston_compositor *compositor, struct weston_log_context *log_ctx) { - if (compositor->weston_log_ctx) - return -1; + assert(!compositor->weston_log_ctx); + assert(log_ctx); - log_ctx->compositor = compositor; compositor->weston_log_ctx = log_ctx; - return 0; }