summaryrefslogtreecommitdiff
path: root/cmd/tpm_test.c
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2016-10-16 15:13:55 (GMT)
committerSimon Glass <sjg@chromium.org>2016-12-02 17:37:47 (GMT)
commit0427b9c52578b2bb0dc1a3058d732899d107f74d (patch)
tree4536722ea9df9604a7423ac1d43df072ea386970 /cmd/tpm_test.c
parent9ae0e14350758e6447c90615ff4df530549a45e2 (diff)
downloadu-boot-fsl-qoriq-0427b9c52578b2bb0dc1a3058d732899d107f74d.tar.xz
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 65332d1..3306405 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,