git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1698
fefdeb5f-60dc-0310-8127-
8f9354f1896f
return c;
}
-
-int pa_is_power_of_two(unsigned n) {
- return !(n & (n - 1));
-}
-
-unsigned pa_make_power_of_two(unsigned n) {
- unsigned j = n;
-
- if (pa_is_power_of_two(n))
- return n;
-
- while (j) {
- j = j >> 1;
- n = n | j;
- }
-
- return n + 1;
-}
char *pa_truncate_utf8(char *c, size_t l);
-int pa_is_power_of_two(unsigned n);
-unsigned pa_make_power_of_two(unsigned n);
+static inline int pa_is_power_of_two(unsigned n) {
+ return !(n & (n - 1));
+}
+
+static inline unsigned pa_make_power_of_two(unsigned n) {
+ unsigned j = n;
+
+ if (pa_is_power_of_two(n))
+ return n;
+
+ while (j) {
+ j = j >> 1;
+ n = n | j;
+ }
+
+ return n + 1;
+}
#endif