diff options
author | Patrick Georgi <pgeorgi@google.com> | 2019-09-10 07:57:58 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-12 11:42:07 +0000 |
commit | eac716b4f6a89873ce7585b63167a4ee4b2dfa3d (patch) | |
tree | 0d0e6132275489f45a996d259220bd788306af3d /util/ecst.c | |
parent | ccd8d9409114b58e552bb466d4d074f326dd551b (diff) | |
download | chrome-ec-eac716b4f6a89873ce7585b63167a4ee4b2dfa3d.tar.gz |
util/ecst.c: Improve return values in calc_header_crc_bin
Ensure consistency in types (TRUE/FALSE) and document the outcome in
the function header.
BUG=none
BRANCH=none
TEST=none
Change-Id: Ie3786f5de6f1a93813afd4a88be2994b690886c6
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1793587
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
Diffstat (limited to 'util/ecst.c')
-rw-r--r-- | util/ecst.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/ecst.c b/util/ecst.c index 01c2151dc7..8bfedce488 100644 --- a/util/ecst.c +++ b/util/ecst.c @@ -1864,7 +1864,7 @@ int main_bin(struct tbinparams binary_params) * Parameters: unsigned short header checksum (O) * unsigned int header offset from first byte in * the binary (I) - * Return: + * Return: TRUE if successful * Description: Go thru bin file and calculate checksum ******************************************************************* */ @@ -1879,13 +1879,13 @@ int calc_header_crc_bin(unsigned int *p_cksum) /* Go thru the BIN File and calculate the Checksum */ if (fseek(g_hfd_pointer, 0x00000000, SEEK_SET) < 0) - return 0; + return FALSE; if (fread(g_header_array, HEADER_SIZE, 1, g_hfd_pointer) != 1) - return 0; + return FALSE; for (i = 0; i < (HEADER_SIZE - HEADER_CRC_FIELDS_SIZE); i++) { |