[pulseaudio-commits] r1685 - /branches/lennart/src/pulsecore/flist.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Aug 21 17:21:01 PDT 2007


Author: lennart
Date: Wed Aug 22 02:21:00 2007
New Revision: 1685

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1685&root=3Dpulseaudio&vi=
ew=3Drev
Log:
make use of new public function pa_is_power_of_two()

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

Modified: branches/lennart/src/pulsecore/flist.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
flist.c?rev=3D1685&root=3Dpulseaudio&r1=3D1684&r2=3D1685&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/flist.c (original)
+++ branches/lennart/src/pulsecore/flist.c Wed Aug 22 02:21:00 2007
@@ -104,17 +104,13 @@
 =

 #define PA_FLIST_CELLS(x) ((struct cell*) ((uint8_t*) (x) + PA_ALIGN(sizeo=
f(struct pa_flist))))
 =

-static int is_power_of_two(unsigned size) {
-    return !(size & (size - 1));
-}
-
 pa_flist *pa_flist_new(unsigned size) {
     pa_flist *l;
 =

     if (!size)
         size =3D FLIST_SIZE;
 =

-    assert(is_power_of_two(size));
+    assert(pa_is_power_of_two(size));
 =

     l =3D pa_xmalloc0(PA_ALIGN(sizeof(pa_flist)) + (sizeof(struct cell) * =
size));
 =





More information about the pulseaudio-commits mailing list