[pulseaudio-commits] r1917 - /branches/lennart/src/pulsecore/rtpoll.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Sep 28 06:15:12 PDT 2007


Author: lennart
Date: Fri Sep 28 15:15:11 2007
New Revision: 1917

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1917&root=pulseaudio&view=rev
Log:
treat timer_enabled like a real, grown-up boolean variable

Modified:
    branches/lennart/src/pulsecore/rtpoll.c

Modified: branches/lennart/src/pulsecore/rtpoll.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/rtpoll.c?rev=1917&root=pulseaudio&r1=1916&r2=1917&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/rtpoll.c (original)
+++ branches/lennart/src/pulsecore/rtpoll.c Fri Sep 28 15:15:11 2007
@@ -374,13 +374,13 @@
 #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 @@
                 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 */




More information about the pulseaudio-commits mailing list