summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-09-12 16:27:14 +0200
committerCommit Bot <commit-bot@chromium.org>2019-09-12 23:36:55 +0000
commitf962b50c920c4566ec9f40f884b4739b772a329b (patch)
treecb96879fee906f7514ab92b56d2d6560c3d5fd6c
parentbcd8b7cffbde9f20dc337a2ec991e49031eaf695 (diff)
downloadchrome-ec-f962b50c920c4566ec9f40f884b4739b772a329b.tar.gz
util/ecst: Fix sign issues for file size
Since we'll never have to deal with 2GB+ sized images, don't bother with larger data types. Found by Coverity Scan #203948 BUG=none BRANCH=none TEST=none Change-Id: I95cb75d693b94444a87d2100a3f25ddae87a5faa Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1801207 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/ecst.c b/util/ecst.c
index 8bfedce488..22f9f6c0e8 100644
--- a/util/ecst.c
+++ b/util/ecst.c
@@ -33,7 +33,7 @@ unsigned int fw_offset;
int is_ptr_merge;
unsigned int g_ram_start_address;
unsigned int g_ram_size;
-unsigned int api_file_size_bytes;
+int api_file_size_bytes;
int is_mrider15 = FALSE;
/* Chips information, RAM start address and RAM size. */
@@ -2289,7 +2289,7 @@ unsigned int calc_api_csum_bin(void)
unsigned int i;
unsigned int calc_read_bytes;
- unsigned int calc_num_of_bytes_to_read;
+ int calc_num_of_bytes_to_read;
unsigned int calc_curr_position;
unsigned int calc_fw_checksum_crc = 0;
unsigned char g_fw_array[BUFF_SIZE];