spice: remove unused watch list

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Message-id: 20171122135625.16625-2-fziglio@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-11-22 13:56:23 +00:00 committed by Gerd Hoffmann
parent 9fedfa4909
commit 44e8f22986

View File

@ -92,9 +92,7 @@ struct SpiceWatch {
int event_mask; int event_mask;
SpiceWatchFunc func; SpiceWatchFunc func;
void *opaque; void *opaque;
QTAILQ_ENTRY(SpiceWatch) next;
}; };
static QTAILQ_HEAD(, SpiceWatch) watches = QTAILQ_HEAD_INITIALIZER(watches);
static void watch_read(void *opaque) static void watch_read(void *opaque)
{ {
@ -131,7 +129,6 @@ static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *
watch->fd = fd; watch->fd = fd;
watch->func = func; watch->func = func;
watch->opaque = opaque; watch->opaque = opaque;
QTAILQ_INSERT_TAIL(&watches, watch, next);
watch_update_mask(watch, event_mask); watch_update_mask(watch, event_mask);
return watch; return watch;
@ -140,7 +137,6 @@ static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *
static void watch_remove(SpiceWatch *watch) static void watch_remove(SpiceWatch *watch)
{ {
qemu_set_fd_handler(watch->fd, NULL, NULL, NULL); qemu_set_fd_handler(watch->fd, NULL, NULL, NULL);
QTAILQ_REMOVE(&watches, watch, next);
g_free(watch); g_free(watch);
} }