diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 15:06:48 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-29 05:57:16 +0000 |
commit | ef595454825169b76d7cba54cf4947b0ad3df919 (patch) | |
tree | 2750e9fcf54be554b357d01ba6bac3c0c74d6bdf /extra | |
parent | f6ac09b09303ba56e9c3a6dd9b01ceb2187b013e (diff) | |
download | chrome-ec-ef595454825169b76d7cba54cf4947b0ad3df919.tar.gz |
extra/usb_updater/desc_parser.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I85737cb5b016e830d8b96b962b82ec4a276dc03e
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730190
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/usb_updater/desc_parser.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/extra/usb_updater/desc_parser.c b/extra/usb_updater/desc_parser.c index 5bd996bdda..c0afe835ac 100644 --- a/extra/usb_updater/desc_parser.c +++ b/extra/usb_updater/desc_parser.c @@ -75,8 +75,7 @@ static int get_next_token(char *input, size_t expected_size, char **output) next_colon = strchr(input, ':'); if (next_colon) *next_colon = '\0'; - if (!next_colon || (expected_size && - strlen(input) != expected_size)) { + if (!next_colon || (expected_size && strlen(input) != expected_size)) { fprintf(stderr, "Invalid entry in section %d\n", section_count_); return -EINVAL; @@ -98,16 +97,15 @@ static int get_hex_value(char *input, char **output) value = strtol(input, &e, 16); if ((e && *e) || (strlen(input) > 8)) { - fprintf(stderr, "Invalid hex value %s in section %d\n", - input, section_count_); + fprintf(stderr, "Invalid hex value %s in section %d\n", input, + section_count_); return -EINVAL; } return value; } -static int parse_range(char *next_line, - size_t line_len, +static int parse_range(char *next_line, size_t line_len, struct addr_range *parsed_range) { char *line_cursor; @@ -299,7 +297,6 @@ int parser_get_next_range(struct addr_range **range) *range = new_range; return 0; - } int parser_find_board(const char *hash_file_name, const char *board_id) |