From: Lennart Poettering Date: Fri, 28 Sep 2007 13:15:11 +0000 (+0000) Subject: treat timer_enabled like a real, grown-up boolean variable X-Git-Tag: submit/2.0-panda/20130828.192557~2837^2~1^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67b899acc915a3d01623a7d517f81eab7231d11d;p=profile%2Fivi%2Fpulseaudio-panda.git treat timer_enabled like a real, grown-up boolean variable git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1917 fefdeb5f-60dc-0310-8127-8f9354f1896f --- diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c index 921619d..de0ffa4 100644 --- a/src/pulsecore/rtpoll.c +++ b/src/pulsecore/rtpoll.c @@ -374,13 +374,13 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) { #ifdef __linux__ if (!p->dont_use_ppoll) #endif - r = ppoll(p->pollfd, p->n_pollfd_used, p->timer_enabled > 0 ? &timeout : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked); + r = ppoll(p->pollfd, p->n_pollfd_used, p->timer_enabled ? &timeout : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked); #ifdef __linux__ else #endif #endif - r = poll(p->pollfd, p->n_pollfd_used, p->timer_enabled > 0 ? (timeout.tv_sec*1000) + (timeout.tv_nsec / 1000000) : -1); + r = poll(p->pollfd, p->n_pollfd_used, p->timer_enabled ? (timeout.tv_sec*1000) + (timeout.tv_nsec / 1000000) : -1); if (r < 0) { if (errno == EAGAIN || errno == EINTR) @@ -403,7 +403,7 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) { pa_timespec_add(&p->next_elapse, (pa_timespec_diff(&now, &p->next_elapse) / p->period + 1) * p->period); } else - p->timer_enabled = 0; + p->timer_enabled = FALSE; } /* Let's tell everyone that we left the sleep */