Fix-up coding style
The .clang-format is a symlink to ../init/.clang-format, which is merged
recently. As init is the major user of fs_mgr, it's better to keep the
style consistent.
Only recent newly-added files written by me are formatted. For other
files, let's format them gradually to keep 'git blame' intact.
Bug: None
Test: Device can boot with AVB
Change-Id: I5c72f23b38534d5bcef3e4f9f0f477fa40496433
diff --git a/fs_mgr/fs_mgr_priv_sha.h b/fs_mgr/fs_mgr_priv_sha.h
index 1abc273..882411b 100644
--- a/fs_mgr/fs_mgr_priv_sha.h
+++ b/fs_mgr/fs_mgr_priv_sha.h
@@ -19,8 +19,7 @@
#include <openssl/sha.h>
-class SHA256Hasher
-{
+class SHA256Hasher {
private:
SHA256_CTX sha256_ctx;
uint8_t hash[SHA256_DIGEST_LENGTH];
@@ -28,25 +27,17 @@
public:
enum { DIGEST_SIZE = SHA256_DIGEST_LENGTH };
- SHA256Hasher()
- {
- SHA256_Init(&sha256_ctx);
- }
+ SHA256Hasher() { SHA256_Init(&sha256_ctx); }
- void update(const void *data, size_t data_size)
- {
- SHA256_Update(&sha256_ctx, data, data_size);
- }
+ void update(const void* data, size_t data_size) { SHA256_Update(&sha256_ctx, data, data_size); }
- const uint8_t *finalize()
- {
+ const uint8_t* finalize() {
SHA256_Final(hash, &sha256_ctx);
return hash;
}
};
-class SHA512Hasher
-{
+class SHA512Hasher {
private:
SHA512_CTX sha512_ctx;
uint8_t hash[SHA512_DIGEST_LENGTH];
@@ -54,18 +45,13 @@
public:
enum { DIGEST_SIZE = SHA512_DIGEST_LENGTH };
- SHA512Hasher()
- {
- SHA512_Init(&sha512_ctx);
- }
+ SHA512Hasher() { SHA512_Init(&sha512_ctx); }
- void update(const uint8_t *data, size_t data_size)
- {
+ void update(const uint8_t* data, size_t data_size) {
SHA512_Update(&sha512_ctx, data, data_size);
}
- const uint8_t *finalize()
- {
+ const uint8_t* finalize() {
SHA512_Final(hash, &sha512_ctx);
return hash;
}