CRAS: Format cras_tm
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: Id255734da2d0bdeb48bf597fd6d63fbe6f8c3fbe
Reviewed-on: https://chromium-review.googlesource.com/1669342
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/cras_tm.c b/cras/src/server/cras_tm.c
index 2eb9fe1..c215fdc 100644
--- a/cras/src/server/cras_tm.c
+++ b/cras/src/server/cras_tm.c
@@ -53,11 +53,10 @@
/* Exported Interface. */
-struct cras_timer *cras_tm_create_timer(
- struct cras_tm *tm,
- unsigned int ms,
- void (*cb)(struct cras_timer *t, void *data),
- void *cb_data)
+struct cras_timer *cras_tm_create_timer(struct cras_tm *tm, unsigned int ms,
+ void (*cb)(struct cras_timer *t,
+ void *data),
+ void *cb_data)
{
struct cras_timer *t;
@@ -91,7 +90,7 @@
{
struct cras_timer *t;
- DL_FOREACH(tm->timers, t) {
+ DL_FOREACH (tm->timers, t) {
DL_DELETE(tm->timers, t);
free(t);
}
@@ -108,7 +107,7 @@
return 0;
min = &tm->timers->ts;
- DL_FOREACH(tm->timers, t)
+ DL_FOREACH (tm->timers, t)
if (timespec_sooner(&t->ts, min))
min = &t->ts;
diff --git a/cras/src/server/cras_tm.h b/cras/src/server/cras_tm.h
index 2dfd8c2..4cc37ac 100644
--- a/cras/src/server/cras_tm.h
+++ b/cras/src/server/cras_tm.h
@@ -24,11 +24,10 @@
* Pointer to a newly allocated timer, passed timer to cras_tm_cancel_timer
* to cancel before it fires.
*/
-struct cras_timer *cras_tm_create_timer(
- struct cras_tm *tm,
- unsigned int ms,
- void (*cb)(struct cras_timer *t, void *data),
- void *cb_data);
+struct cras_timer *cras_tm_create_timer(struct cras_tm *tm, unsigned int ms,
+ void (*cb)(struct cras_timer *t,
+ void *data),
+ void *cb_data);
/* Deletes a timer returned from cras_tm_create_timer. */
void cras_tm_cancel_timer(struct cras_tm *tm, struct cras_timer *t);