summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-06-14 14:23:31 -0700
committerChromeBot <chrome-bot@google.com>2013-06-14 16:16:09 -0700
commit7884ae482187ed79bde3bc0cd28bb22b2b7dfe6a (patch)
tree111ef80d11c20191734bdae2e0b1772a4b8c1c1f
parent6a701c59576ace1c6a5d5f74ae661285b1773b97 (diff)
downloadchrome-ec-7884ae482187ed79bde3bc0cd28bb22b2b7dfe6a.tar.gz
Fix some stupidness in ectool's comm_init() handling
ectool was checking for negative return values on comm_init(). It should have been checking for nonzero. Or comm_init should have been returning negative. Whatever. The ectool utility was supposed to be a quick-n-dirty debugging tool, so it's not very well tested. BUG=chromium:249218 BRANCH=none TEST=manual Fired up VM instance, tried old version and new version. Old version coredumps, new version doesn't. Change-Id: I0e27d78eead562a16ff826fb80de9e6b07476e12 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58712 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--util/ectool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 521ebea767..94a5f3d4ef 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -3096,7 +3096,7 @@ int main(int argc, char *argv[])
exit(1);
}
- if (comm_init() < 0) {
+ if (comm_init()) {
fprintf(stderr, "Couldn't find EC\n");
goto out;
}