aboutsummaryrefslogtreecommitdiff
path: root/cmd/tpm_test.c
diff options
context:
space:
mode:
authorStefan Brüns2016-10-16 17:13:55 +0200
committerSimon Glass2016-12-02 10:37:47 -0700
commit0427b9c52578b2bb0dc1a3058d732899d107f74d (patch)
tree4536722ea9df9604a7423ac1d43df072ea386970 /cmd/tpm_test.c
parent9ae0e14350758e6447c90615ff4df530549a45e2 (diff)
cmd/tpm_test: Fix misleading code indentation
GCC 6.2 reasonably complains about the current code: ../cmd/tpm_test.c: In function ‘do_tpmtest’: ../cmd/tpm_test.c:540:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (i = 0; i < argc; i++) ^~~ ../cmd/tpm_test.c:542:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ printf("\n------\n"); ^~~~~~ Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Simon Glass <sjg@chromium.org> Updated to remove C99 variable decl: Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/tpm_test.c')
-rw-r--r--cmd/tpm_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c
index 65332d11177..33064059487 100644
--- a/cmd/tpm_test.c
+++ b/cmd/tpm_test.c
@@ -532,15 +532,15 @@ static cmd_tbl_t cmd_cros_tpm_sub[] = {
static int do_tpmtest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *c;
+ int i;
printf("argc = %d, argv = ", argc);
- do {
- int i = 0;
- for (i = 0; i < argc; i++)
- printf(" %s", argv[i]);
- printf("\n------\n");
- } while (0);
+ for (i = 0; i < argc; i++)
+ printf(" %s", argv[i]);
+
+ printf("\n------\n");
+
argc--;
argv++;
c = find_cmd_tbl(argv[0], cmd_cros_tpm_sub,