[pulseaudio-commits] r1480 - /branches/lennart/src/pulsecore/asyncq.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jun 14 13:11:46 PDT 2007


Author: lennart
Date: Thu Jun 14 22:11:46 2007
New Revision: 1480

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1480&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Fix a nasty typo in pa_asyncq_pop

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

Modified: branches/lennart/src/pulsecore/asyncq.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
asyncq.c?rev=3D1480&root=3Dpulseaudio&r1=3D1479&r2=3D1480&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/asyncq.c (original)
+++ branches/lennart/src/pulsecore/asyncq.c Thu Jun 14 22:11:46 2007
@@ -141,8 +141,10 @@
                 int x[20];
                 =

                 errno =3D 0;
-                if ((r =3D read(l->write_fds[0], x, sizeof(x))) <=3D 0 && =
errno !=3D EINTR)
+                if ((r =3D read(l->write_fds[0], x, sizeof(x))) < 0 && err=
no !=3D EINTR)
                     return -1;
+
+                pa_assert(r !=3D 0);
                 =

                 if (r > 0)
                     if (pa_atomic_sub(&l->n_read, r) <=3D r)
@@ -174,6 +176,8 @@
                 return -1;
             }
 =

+            pa_assert(r !=3D 0);
+
             if (r > 0)
                 pa_atomic_sub(&l->n_read, r);
         }
@@ -220,8 +224,10 @@
                 int x[20];
                 =

                 errno =3D 0;
-                if ((r =3D read(l->read_fds[0], x, sizeof(x))) <=3D 0 && e=
rrno !=3D EINTR)
+                if ((r =3D read(l->read_fds[0], x, sizeof(x))) < 0 && errn=
o !=3D EINTR)
                     return NULL;
+
+                pa_assert(r !=3D 0);
                 =

                 if (r > 0)
                     if (pa_atomic_sub(&l->n_written, r) <=3D r)
@@ -246,11 +252,13 @@
 =

             _Y;
 =

-            if ((r =3D read(l->read_fds[0], x, sizeof(x)) < 0) && errno !=
=3D EINTR) {
+            if ((r =3D read(l->read_fds[0], x, sizeof(x))) < 0 && errno !=
=3D EINTR) {
                 pa_atomic_dec(&l->read_waiting);
                 return NULL;
             }
 =

+            pa_assert(r !=3D 0);
+
             if (r > 0)
                 pa_atomic_sub(&l->n_written, r);
         }
@@ -312,7 +320,4 @@
     pa_assert(pa_atomic_load(&l->read_waiting) > 0);
 =

     pa_atomic_dec(&l->read_waiting);
-
-
-    =

-}
+}




More information about the pulseaudio-commits mailing list