summaryrefslogtreecommitdiff
path: root/board/twinkie/injector.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-07-31 15:58:39 -0600
committerchrome-bot <chrome-bot@chromium.org>2017-08-03 15:13:56 -0700
commit41a0dc443c84c9e3a79ed40499d9ee9c6962fbd0 (patch)
treee09e4fecf2bb6feb53c6f72de03e611e156688c1 /board/twinkie/injector.c
parent716b0fcf4f3fceae3a156a118d2979227ac06226 (diff)
downloadchrome-ec-41a0dc443c84c9e3a79ed40499d9ee9c6962fbd0.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>
Diffstat (limited to 'board/twinkie/injector.c')
-rw-r--r--board/twinkie/injector.c5
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]);