diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2016-10-16 17:13:55 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-12-02 10:37:47 -0700 |
commit | 0427b9c52578b2bb0dc1a3058d732899d107f74d (patch) | |
tree | 4536722ea9df9604a7423ac1d43df072ea386970 /cmd | |
parent | 9ae0e14350758e6447c90615ff4df530549a45e2 (diff) | |
download | u-boot-0427b9c52578b2bb0dc1a3058d732899d107f74d.tar.gz u-boot-0427b9c52578b2bb0dc1a3058d732899d107f74d.tar.bz2 u-boot-0427b9c52578b2bb0dc1a3058d732899d107f74d.zip |
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')
-rw-r--r-- | cmd/tpm_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c index 65332d1117..3306405948 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, |