From 67619fa739c5eac69c30cfd65e66814117650f8f Mon Sep 17 00:00:00 2001 From: Dominik Loidolt <dominik.loidolt@univie.ac.at> Date: Mon, 26 Sep 2022 11:55:22 +0200 Subject: [PATCH] some code formatting --- lib/cmp_data_types.c | 3 ++- lib/cmp_io.c | 10 +++++----- lib/decmp.c | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cmp_data_types.c b/lib/cmp_data_types.c index ee0131f..ed7d5e6 100644 --- a/lib/cmp_data_types.c +++ b/lib/cmp_data_types.c @@ -99,7 +99,8 @@ struct cmp_max_used_bits cmp_get_max_used_bits(void) * @returns version of the max used bits registry */ -uint8_t cmp_get_max_used_bits_version(void) { +uint8_t cmp_get_max_used_bits_version(void) +{ return max_used_bits.version; } diff --git a/lib/cmp_io.c b/lib/cmp_io.c index be0f8ed..d8772fd 100644 --- a/lib/cmp_io.c +++ b/lib/cmp_io.c @@ -414,7 +414,7 @@ enum cmp_data_type string2data_type(const char *data_type_str) if (isalpha(data_type_str[0])) { /* check if mode is given as text */ size_t j; - for (j = 0; j < sizeof(data_type_string_table) / sizeof(data_type_string_table[0]); j++) { + for (j = 0; j < sizeof(data_type_string_table) / sizeof(data_type_string_table[0]); j++) { if (!strcmp(data_type_str, data_type_string_table[j].str)) { data_type = data_type_string_table[j].data_type; break; @@ -447,7 +447,7 @@ const char *data_type2string(enum cmp_data_type data_type) size_t j; const char *string = "DATA_TYPE_UNKNOWN"; - for (j = 0; j < sizeof(data_type_string_table) / sizeof(data_type_string_table[0]); j++) { + for (j = 0; j < sizeof(data_type_string_table) / sizeof(data_type_string_table[0]); j++) { if (data_type == data_type_string_table[j].data_type) { string = data_type_string_table[j].str; break; @@ -472,7 +472,7 @@ int cmp_mode_parse(const char *cmp_mode_str, uint32_t *cmp_mode) { size_t j; static const struct { - uint32_t cmp_mode; + uint32_t cmp_mode; const char *str; } conversion[] = { {CMP_MODE_RAW, "MODE_RAW"}, @@ -493,7 +493,7 @@ int cmp_mode_parse(const char *cmp_mode_str, uint32_t *cmp_mode) return -1; if (isalpha(cmp_mode_str[0])) { /* check if mode is given as text */ - for (j = 0; j < sizeof(conversion) / sizeof(conversion[0]); ++j) { + for (j = 0; j < sizeof(conversion) / sizeof(conversion[0]); ++j) { if (!strcmp(cmp_mode_str, conversion[j].str)) { *cmp_mode = conversion[j].cmp_mode; return 0; @@ -825,7 +825,7 @@ int read_cmp_cfg(const char *file_name, struct cmp_cfg *cfg, int verbose_en) /** - * @brief parse a file containing a decompression information + * @brief parse a file containing a decompression information * @note internal use only! * * @param fp FILE pointer diff --git a/lib/decmp.c b/lib/decmp.c index da75d50..c266e64 100644 --- a/lib/decmp.c +++ b/lib/decmp.c @@ -148,8 +148,7 @@ static int rice_decoder(uint32_t code_word, unsigned int m, unsigned int log2_m, */ static int golomb_decoder(unsigned int code_word, unsigned int m, - unsigned int log2_m, unsigned int - *decoded_cw) + unsigned int log2_m, unsigned int *decoded_cw) { unsigned int q; /* quotient code */ unsigned int r1; /* remainder code group 1 */ -- GitLab