ui/vnc: Drop unused vnc_has_job() and vnc_jobs_clear()
PATCH 1/1 ui/vnc: Drop unused vnc_has_job() and vnc_jobs_clear()
The functions vnc_has_job() and vnc_jobs_clear() are never used; remove them.
---
I last had a go at this five years ago:
http://patchwork.ozlabs.org/patch/192335/
Since then vnc_stop_worker_thread() got removed anyway in commit 09526058d, but the vnc_jobs_clear() function that it was the only caller of got left behind.
vnc_has_job() has never been used by anybody, and it's impossible to use in a non-racy way, so drop it too.
ui/vnc-jobs.h | 2 -- ui/vnc-jobs.c | 23 ----------------------- 2 files changed, 25 deletions(-)
ui/vnc-jobs.h +0 -2
@@ -34,8 +34,6 @@VncJob *vnc_job_new (VncState *vs);int vnc_job_add_rect (VncJob *job,int x,int y,int w,int h);void vnc_job_push (VncJob *job); -bool vnc_has_job (VncState *vs); -void vnc_jobs_clear (VncState *vs);void vnc_jobs_join (VncState *vs);void vnc_jobs_consume_buffer (VncState *vs);
ui/vnc-jobs.c +0 -23
@@ -128,29 +128,6 @@ static bool vnc_has_job_locked(VncState *vs)return false; } -bool vnc_has_job (VncState *vs) -{ -bool ret; - -vnc_lock_queue (queue); - ret =vnc_has_job_locked (vs); -vnc_unlock_queue (queue); -return ret; -} - -void vnc_jobs_clear (VncState *vs) -{ -VncJob *job, *tmp; - -vnc_lock_queue (queue); - QTAILQ_FOREACH_SAFE(job, &queue->jobs, next, tmp) { -if (job->vs == vs || !vs) { -QTAILQ_REMOVE (&queue->jobs, job, next); - } - } -vnc_unlock_queue (queue); -} -void vnc_jobs_join (VncState *vs) {vnc_lock_queue (queue);
Signature · 1 line
2.7.4
Quoted 13 lines · Peter Maydell
The functions
vnc_has_job()andvnc_jobs_clear()are never used; remove them.Signed-off-by Peter Maydell <[email protected]>---
I last had a go at this five years ago:
http://patchwork.ozlabs.org/patch/192335/Since then
vnc_stop_worker_thread()got removed anyway in commit09526058d, but thevnc_jobs_clear()function that it was the only caller of got left behind.
Quoted 6 lines
vnc_has_job()has never been used by anybody, and it's impossible to use in a non-racy way, so drop it too.ui/vnc-jobs.h | 2 -- ui/vnc-jobs.c | 23 ----------------------- 2 files changed, 25 deletions(-)
Quoted 2 lines · Peter Maydell
The functions
vnc_has_job()andvnc_jobs_clear()are never used; remove them.
Added to ui patch queue.
thanks,
Gerd