From 68b5d47d9a2b701ec30052db82e731739dfee7ef Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 22 Jan 2019 10:50:34 +0100 Subject: [PATCH] Removed internal checks. --- uwac/libuwac/uwac-clipboard.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/uwac/libuwac/uwac-clipboard.c b/uwac/libuwac/uwac-clipboard.c index 6b6fc07ce..41cecf077 100644 --- a/uwac/libuwac/uwac-clipboard.c +++ b/uwac/libuwac/uwac-clipboard.c @@ -126,13 +126,9 @@ static const struct wl_data_source_listener data_source_listener = .cancelled = data_source_cancelled_handler }; -static UwacReturnCode UwacRegisterDeviceListener(UwacSeat* s) +static void UwacRegisterDeviceListener(UwacSeat* s) { - if (!s) - return UWAC_ERROR_INTERNAL; - wl_data_device_add_listener(s->data_device, &data_device_listener, s); - return UWAC_SUCCESS; } UwacReturnCode UwacCreateDataSource(UwacSeat* s) @@ -153,10 +149,7 @@ UwacReturnCode UwacSeatRegisterClipboard(UwacSeat* s) if (!s) return UWAC_ERROR_INTERNAL; - rc = UwacRegisterDeviceListener(s); - - if (rc != UWAC_SUCCESS) - return rc; + UwacRegisterDeviceListener(s); rc = UwacCreateDataSource(s);