summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2020-10-26 14:06:39 +0100
committerThiƩbaud Weksteen <tweek@google.com>2020-10-26 15:31:32 +0100
commit8d0cbc6d4b79214dd75313a9739ce6868dcfb460 (patch)
tree3d56c89b6d07af451ce5dc140bf3c67948cfbc7f /libfec
parent7ebc9e6cd61d5b167ccccbea85f42387370f51a7 (diff)
downloadextras-8d0cbc6d4b79214dd75313a9739ce6868dcfb460.tar.gz
libfec: consistently use check()
The check() macro does not require a final semi-colon but its usage is inconsistent through the code. Add a semi-colon for all calls to check(). Change-Id: I5c9da52039f5c59428d40efe02a63aaec54bfb78
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_open.cpp2
-rw-r--r--libfec/fec_process.cpp2
-rw-r--r--libfec/fec_verity.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp
index fe458097..175207b8 100644
--- a/libfec/fec_open.cpp
+++ b/libfec/fec_open.cpp
@@ -468,7 +468,7 @@ int fec_ecc_get_metadata(struct fec_handle *f, struct fec_ecc_metadata *data)
check(f->data_size < f->size);
check(f->ecc.start >= f->data_size);
check(f->ecc.start < f->size);
- check(f->ecc.start % FEC_BLOCKSIZE == 0)
+ check(f->ecc.start % FEC_BLOCKSIZE == 0);
data->valid = f->ecc.valid;
data->roots = f->ecc.roots;
diff --git a/libfec/fec_process.cpp b/libfec/fec_process.cpp
index 6e0ddd11..f11b8b2c 100644
--- a/libfec/fec_process.cpp
+++ b/libfec/fec_process.cpp
@@ -44,7 +44,7 @@ ssize_t process(fec_handle *f, uint8_t *buf, size_t count, uint64_t offset,
read_func func)
{
check(f);
- check(buf)
+ check(buf);
check(func);
if (count == 0) {
diff --git a/libfec/fec_verity.cpp b/libfec/fec_verity.cpp
index 0290c1ff..45c197ff 100644
--- a/libfec/fec_verity.cpp
+++ b/libfec/fec_verity.cpp
@@ -123,9 +123,9 @@ uint64_t verity_get_size(uint64_t file_size, uint32_t *verity_levels,
int hashtree_info::get_hash(const uint8_t *block, uint8_t *hash) {
auto md = EVP_get_digestbynid(nid_);
- check(md)
+ check(md);
auto mdctx = EVP_MD_CTX_new();
- check(mdctx)
+ check(mdctx);
EVP_DigestInit_ex(mdctx, md, nullptr);
EVP_DigestUpdate(mdctx, salt.data(), salt.size());
@@ -134,7 +134,7 @@ int hashtree_info::get_hash(const uint8_t *block, uint8_t *hash) {
EVP_DigestFinal_ex(mdctx, hash, &hash_size);
EVP_MD_CTX_free(mdctx);
- check(hash_size == digest_length_)
+ check(hash_size == digest_length_);
return 0;
}
@@ -170,7 +170,7 @@ bool hashtree_info::check_block_hash(const uint8_t *expected,
bool hashtree_info::check_block_hash_with_index(uint64_t index,
const uint8_t *block) {
- check(index < data_blocks)
+ check(index < data_blocks);
const uint8_t *expected = &hash_data[index * padded_digest_length_];
return check_block_hash(expected, block);