Typos, and braces.
diff --git a/TPMCmd/tpm/include/prototypes/ExecCommand_fp.h b/TPMCmd/tpm/include/prototypes/ExecCommand_fp.h
index 7d2e5fd..39b7e0d 100644
--- a/TPMCmd/tpm/include/prototypes/ExecCommand_fp.h
+++ b/TPMCmd/tpm/include/prototypes/ExecCommand_fp.h
@@ -57,7 +57,7 @@
// 3) marshal the responses into the response buffer.
// f) If any error occurs in any of the steps above create the error response
// and return.
-// g) Calls BuildResponseSessions() to:
+// g) Calls BuildResponseSession() to:
// 1) when necessary, encrypt a parameter
// 2) build the response authorization sessions
// 3) update the audit sessions and nonces
diff --git a/TPMCmd/tpm/src/command/Attestation/CertifyX509.c b/TPMCmd/tpm/src/command/Attestation/CertifyX509.c
index 6181b4b..2410ca2 100644
--- a/TPMCmd/tpm/src/command/Attestation/CertifyX509.c
+++ b/TPMCmd/tpm/src/command/Attestation/CertifyX509.c
@@ -77,9 +77,9 @@
// certTBS holds an array of pointers and lengths. Each entry references the
// corresponding value in a TBSCertificate structure. For example, the 1th
// element references the version number
- stringRef certTBS[REF_COUNT] = {{0}};
+ stringRef certTBS[REF_COUNT] = {0};
#define ALLOWED_SEQUENCES (SUBJECT_PUBLIC_KEY_REF - SIGNATURE_REF)
- stringRef partial[ALLOWED_SEQUENCES] = {{0}};
+ stringRef partial[ALLOWED_SEQUENCES] = {0};
INT16 countOfSequences = 0;
INT16 i;
//
@@ -149,7 +149,7 @@
// number of elements.
if((ctx.offset != ctx.size) || (countOfSequences < 3)
|| (countOfSequences > 4)
- || (certTBS[EXTENSIONS_REF].buf == NULL))
+ || (certTBS[EXTENSIONS_REF].buf == 0))
return TPM_RCS_VALUE + RC_CertifyX509_partialCertificate;
// Now that we know how many sequences there were, we can put them where they
// belong
diff --git a/TPMCmd/tpm/src/crypt/AlgorithmTests.c b/TPMCmd/tpm/src/crypt/AlgorithmTests.c
index c70e11e..e1ad363 100644
--- a/TPMCmd/tpm/src/crypt/AlgorithmTests.c
+++ b/TPMCmd/tpm/src/crypt/AlgorithmTests.c
@@ -126,11 +126,11 @@
break;
#endif
default:
- FAIL(FATAL_ERROR_INTERNAL);
+ FAIL(FATAL_ERROR_INTERNAL);
}
// Clear the to-test bits
CLEAR_BOTH(hashAlg);
-
+
// If there is an algorithm without test vectors, then assume that things are OK.
if(testDigest == NULL)
return TPM_RC_SUCCESS;
@@ -212,7 +212,8 @@
//*** AllSymsAreDone()
// Checks if both symmetric algorithms have been tested. This is put here
-// so that addition of a symmetric algorithm will be relatively easy to handle
+// so that addition of a symmetric algorithm will be relatively easy to handle.
+//
// Return Type: BOOL
// TRUE(1) all symmetric algorithms tested
// FALSE(0) not all symmetric algorithms tested
@@ -811,7 +812,7 @@
// algorithm or just clear a bit if there is no test for the algorithm. So,
// either this loop will be executed once for the selected algorithm or once for
// each of the possible algorithms. If it is executed more than once ('alg' ==
- // ALG_ERROR), then no test will be run but bits will be cleared for
+ // ALG_ERROR), then no test will be run but bits will be cleared for
// unimplemented algorithms. This was done this way so that there is only one
// case statement with all of the algorithms. It was easier to have one case
// statement than to have multiple ones to manage whenever an algorithm ID is
@@ -829,7 +830,7 @@
}
// Process whatever is left.
// NOTE: since this switch will only be called if the algorithm is
- // implemented, it is not necessary to modify this list except to comment
+ // implemented, it is not necessary to modify this list except to comment
// out the algorithms for which there is no test
switch(alg)
{
diff --git a/TPMCmd/tpm/src/main/ExecCommand.c b/TPMCmd/tpm/src/main/ExecCommand.c
index d7673c5..7e70632 100644
--- a/TPMCmd/tpm/src/main/ExecCommand.c
+++ b/TPMCmd/tpm/src/main/ExecCommand.c
@@ -62,7 +62,7 @@
// 3) marshal the responses into the response buffer.
// f) If any error occurs in any of the steps above create the error response
// and return.
-// g) Calls BuildResponseSessions() to:
+// g) Calls BuildResponseSession() to:
// 1) when necessary, encrypt a parameter
// 2) build the response authorization sessions
// 3) update the audit sessions and nonces