diff options
author | Martin Roth <martinroth@google.com> | 2017-07-31 15:58:39 -0600 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-09-26 11:32:58 +0000 |
commit | bd9d8353e0345d04f6dc661fbf3513479c0d41f5 (patch) | |
tree | 988940e4481014509f119df355d5ae7b6789f276 | |
parent | d500cdf4b80118fbef64e3209d2e37be041e0ce5 (diff) | |
download | chrome-ec-bd9d8353e0345d04f6dc661fbf3513479c0d41f5.tar.gz |
twinkie: Fix indentation
This code looks fine either inside or outside of the if clause. I chose
to keep it outside and just re-indent it since the previous test
didn't look at the cnt value, so the previous test could pass, and this
test could fail even if cnt wasn't updated.
BUG=None
TEST=build
Change-Id: I869af54f9093ee8a2f855d7a71ea6acf3d3e16f6
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/596490
Commit-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 41a0dc443c84c9e3a79ed40499d9ee9c6962fbd0)
Reviewed-on: https://chromium-review.googlesource.com/684336
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/twinkie/injector.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/board/twinkie/injector.c b/board/twinkie/injector.c index 9b17180955..68b17bde3b 100644 --- a/board/twinkie/injector.c +++ b/board/twinkie/injector.c @@ -526,8 +526,9 @@ static int cmd_bufrd(int argc, char **argv) if (argc >= 2) cnt = strtoi(argv[1], &e, 10); - if (*e || idx + cnt > INJ_CMD_COUNT) - return EC_ERROR_PARAM3; + + if (*e || idx + cnt > INJ_CMD_COUNT) + return EC_ERROR_PARAM3; for (i = idx; i < idx + cnt; i++) ccprintf("%08x ", inj_cmds[i]); |