summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-10-27 15:12:57 -0500
committerHung-Te Lin <hungte@chromium.org>2016-11-24 04:58:37 +0000
commit05c8e4b2b56016bd952df9c1a2c087c9cdc9fa78 (patch)
tree69b032986e660a959d7b8362084ad023129e7215
parentf1d51fe970a08cb5e1fec4fd30b981ac1dda40a3 (diff)
downloadchrome-ec-05c8e4b2b56016bd952df9c1a2c087c9cdc9fa78.tar.gz
extra/usb_updater: don't use uninitialize variables
The 'transferred_sections' variable wasn't initialized in all paths. Fix that. BUG=chrome-os-partner:58794 BRANCH=None TEST=Built. Change-Id: If82ef1274d6a931e0cd193f276f34bfcac1fb1c7 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404548 Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> (cherry picked from commit 52d80971c79f0775840e1116aee2f96b6f8778ca) Reviewed-on: https://chromium-review.googlesource.com/414729 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org>
-rw-r--r--extra/usb_updater/usb_updater.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/usb_updater/usb_updater.c b/extra/usb_updater/usb_updater.c
index 873dbd7700..574ca9f890 100644
--- a/extra/usb_updater/usb_updater.c
+++ b/extra/usb_updater/usb_updater.c
@@ -1038,7 +1038,7 @@ int main(int argc, char *argv[])
uint16_t vid = VID, pid = PID;
int i;
size_t j;
- int transferred_sections;
+ int transferred_sections = 0;
int binary_vers = 0;
int show_fw_ver = 0;