summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-09-10 07:57:58 +0200
committerCommit Bot <commit-bot@chromium.org>2019-09-12 11:42:07 +0000
commiteac716b4f6a89873ce7585b63167a4ee4b2dfa3d (patch)
tree0d0e6132275489f45a996d259220bd788306af3d
parentccd8d9409114b58e552bb466d4d074f326dd551b (diff)
downloadchrome-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>
-rw-r--r--util/ecst.c6
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++) {