summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-08-22 00:21:00 +0000
committerLennart Poettering <lennart@poettering.net>2007-08-22 00:21:00 +0000
commit531cc3cfaffaeac5f46fc808e20711001b8fc1db (patch)
tree5ad0550f58c2ba75f797d0cb2aa75b782123d371
parentb7b119ae00090074ec0bc48da7a0c4b689efa55c (diff)
make use of new public function pa_is_power_of_two()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1685 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/flist.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c
index 022010b3..b0f3228f 100644
--- a/src/pulsecore/flist.c
+++ b/src/pulsecore/flist.c
@@ -104,17 +104,13 @@ struct pa_flist {
#define PA_FLIST_CELLS(x) ((struct cell*) ((uint8_t*) (x) + PA_ALIGN(sizeof(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 = FLIST_SIZE;
- assert(is_power_of_two(size));
+ assert(pa_is_power_of_two(size));
l = pa_xmalloc0(PA_ALIGN(sizeof(pa_flist)) + (sizeof(struct cell) * size));