Introduce clang-format
An automated and opinionated style for code. We can decide to change the
style and have the source updated by the clang-format tool by running:
make format
I've based the style on the Google style with exceptions to better
match
the current source style.
Change-Id: I43f85c7d4ce02ca999805558b25fcab2e43859c6
diff --git a/src/cpio.c b/src/cpio.c
index c4add22..e8e95ec 100644
--- a/src/cpio.c
+++ b/src/cpio.c
@@ -32,8 +32,8 @@
iter->size_left = c->total_size;
}
-bool cpio_next(struct cpio_iter *iter, const char **name,
- const void **contents, size_t *size)
+bool cpio_next(struct cpio_iter *iter, const char **name, const void **contents,
+ size_t *size)
{
const struct cpio_header *h = iter->cur;
size_t size_left;
@@ -70,7 +70,8 @@
*size = filelen;
iter->cur = (struct cpio_header *)((char *)*contents + filelen);
- iter->cur = (struct cpio_header *)(char *)(((size_t)iter->cur + 1) & ~1);
+ iter->cur =
+ (struct cpio_header *)(char *)(((size_t)iter->cur + 1) & ~1);
iter->size_left = size_left;
return true;