From 0cc1a70ba7fefc4e0eae08bc4d0bbae3ff04be66 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 14 Jan 2020 19:11:01 +0000 Subject: [PATCH] main: remove duplicate function --- src/main.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main.c b/src/main.c index ad9b333..3f3cd81 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Andri Yngvason + * Copyright (c) 2019 - 2020 Andri Yngvason * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -102,17 +102,6 @@ frame_capture_backend_from_string(const char* str) return FRAME_CAPTURE_BACKEND_NONE; } -struct output* wayvnc_output_find(struct wayvnc* self, uint32_t id) -{ - struct output* output; - - wl_list_for_each(output, &self->outputs, link) - if (output->id == id) - return output; - - return NULL; -} - static void registry_add(void* data, struct wl_registry* registry, uint32_t id, const char* interface, uint32_t version) @@ -194,7 +183,7 @@ static void registry_remove(void* data, struct wl_registry* registry, { struct wayvnc* self = data; - struct output* out = wayvnc_output_find(self, id); + struct output* out = output_find_by_id(&self->outputs, id); if (out) { wl_list_remove(&out->link); output_destroy(out);