diff --git a/runloop.c b/runloop.c index 1c6efc0e64..514b1d9756 100644 --- a/runloop.c +++ b/runloop.c @@ -145,7 +145,7 @@ void runloop_msg_queue_push(const char *msg, #endif if (flush) - runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_CLEAR, NULL); + msg_queue_clear(runloop_msg_queue); msg_info.msg = msg; msg_info.prio = prio; @@ -509,9 +509,6 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) slock_unlock(_runloop_msg_queue_lock); #endif break; - case RUNLOOP_CTL_MSG_QUEUE_CLEAR: - msg_queue_clear(runloop_msg_queue); - break; case RUNLOOP_CTL_MSG_QUEUE_DEINIT: if (!runloop_msg_queue) return true; diff --git a/runloop.h b/runloop.h index 7c734171ce..46ddbe558b 100644 --- a/runloop.h +++ b/runloop.h @@ -94,7 +94,6 @@ enum runloop_ctl_state RUNLOOP_CTL_MSG_QUEUE_INIT, RUNLOOP_CTL_MSG_QUEUE_DEINIT, RUNLOOP_CTL_MSG_QUEUE_PULL, - RUNLOOP_CTL_MSG_QUEUE_CLEAR, /* Core options */ RUNLOOP_CTL_HAS_CORE_OPTIONS,