CRAS: Format float_buffer
Reformat codes with the .clang-format we just introduced.
To format whole files provided in-place:
clang-format -i -style=file [<file> ...]
BUG=chromium:950858
TEST=Add directory to check_format_error and run
FEATURES="test" USE=asan emerge-${BOARD} -v media-sound/adhd
Change-Id: I2d59732a22b3b9276ffe29fb47742fe504b63fd4
Reviewed-on: https://chromium-review.googlesource.com/1669341
Tested-by: En-Shuo Hsu <enshuo@google.com>
Commit-Ready: En-Shuo Hsu <enshuo@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
diff --git a/cras/src/server/float_buffer.h b/cras/src/server/float_buffer.h
index 55e176e..39a0187 100644
--- a/cras/src/server/float_buffer.h
+++ b/cras/src/server/float_buffer.h
@@ -26,9 +26,8 @@
* max_size - The max number of frames this buffer may store.
* num_channels - Number of channels of the deinterleaved data.
*/
-static inline struct float_buffer *float_buffer_create(
- unsigned int max_size,
- unsigned int num_channels)
+static inline struct float_buffer *
+float_buffer_create(unsigned int max_size, unsigned int num_channels)
{
struct float_buffer *b;
@@ -36,9 +35,9 @@
b->num_channels = num_channels;
b->fp = (float **)malloc(num_channels * sizeof(float *));
- b->buf = (struct byte_buffer *)
- calloc(1, sizeof(struct byte_buffer) +
- max_size * num_channels * sizeof(float));
+ b->buf = (struct byte_buffer *)calloc(
+ 1, sizeof(struct byte_buffer) +
+ max_size * num_channels * sizeof(float));
b->buf->max_size = max_size;
b->buf->used_size = max_size;
return b;
@@ -119,8 +118,7 @@
}
/* Marks |nread| frames as read in float_buffer. */
-static inline void float_buffer_read(struct float_buffer *b,
- unsigned int nread)
+static inline void float_buffer_read(struct float_buffer *b, unsigned int nread)
{
buf_increment_read(b->buf, nread);
}