rtpoll: Drop extra wait_op argument to pa_rtpoll_run()

is always true, not used

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald 2014-10-28 13:46:37 +01:00 committed by Peter Meerwald
parent 2638591497
commit fa092af59c
17 changed files with 23 additions and 24 deletions

View file

@ -203,7 +203,7 @@ static void reset_all_revents(pa_rtpoll *p) {
}
}
int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
int pa_rtpoll_run(pa_rtpoll *p) {
pa_rtpoll_item *i;
int r = 0;
struct timeval timeout;
@ -285,7 +285,7 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
pa_zero(timeout);
/* Calculate timeout */
if (wait_op && !p->quit && p->timer_enabled) {
if (!p->quit && p->timer_enabled) {
struct timeval now;
pa_rtclock_get(&now);
@ -298,7 +298,7 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
pa_usec_t now = pa_rtclock_now();
p->awake = now - p->timestamp;
p->timestamp = now;
if (wait_op && !p->quit && p->timer_enabled)
if (!p->quit && p->timer_enabled)
pa_log("poll timeout: %d ms ",(int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)));
else if (q->quit)
pa_log("poll timeout is ZERO");
@ -313,10 +313,10 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
struct timespec ts;
ts.tv_sec = timeout.tv_sec;
ts.tv_nsec = timeout.tv_usec * 1000;
r = ppoll(p->pollfd, p->n_pollfd_used, (!wait_op || p->quit || p->timer_enabled) ? &ts : NULL, NULL);
r = ppoll(p->pollfd, p->n_pollfd_used, (p->quit || p->timer_enabled) ? &ts : NULL, NULL);
}
#else
r = pa_poll(p->pollfd, p->n_pollfd_used, (!wait_op || p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1);
r = pa_poll(p->pollfd, p->n_pollfd_used, (p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1);
#endif
p->timer_elapsed = r == 0;