summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLuigi Semenzato <semenzato@google.com>2010-10-04 13:20:00 -0700
committerLuigi Semenzato <semenzato@google.com>2010-10-04 13:20:00 -0700
commite5236952638d68a3178d039da4147e642cab9d54 (patch)
treeb74ba04eb404aa871c1aec56ac07f2165d51b1a1 /tests
parentc93347b3c2d07f8f6022f205a1558a3442cfab35 (diff)
downloadvboot-e5236952638d68a3178d039da4147e642cab9d54.tar.gz
Fix build broken by assert() expanding to nothing.
Change-Id: I4d781bad6e638d681e930b70ed94fa3ec694ab0a BUG=none TEST=compiled locally and with emerge-x86-generic. Review URL: http://codereview.chromium.org/3551014
Diffstat (limited to 'tests')
-rw-r--r--tests/tpm_lite/spaceperm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/tpm_lite/spaceperm.c b/tests/tpm_lite/spaceperm.c
index c49a1a99..13c31862 100644
--- a/tests/tpm_lite/spaceperm.c
+++ b/tests/tpm_lite/spaceperm.c
@@ -14,10 +14,11 @@
#include "tlcl_tests.h"
#include "utility.h"
+#define PERMPPGL (TPM_NV_PER_PPWRITE | TPM_NV_PER_GLOBALLOCK)
+#define PERMPP TPM_NV_PER_PPWRITE
+
int main(int argc, char** argv) {
uint32_t perm;
- uint32_t perm_pp_gl = TPM_NV_PER_PPWRITE | TPM_NV_PER_GLOBALLOCK;
- uint32_t perm_pp = TPM_NV_PER_PPWRITE;
TlclLibInit();
TPM_CHECK(TlclStartupIfNeeded());
@@ -25,10 +26,10 @@ int main(int argc, char** argv) {
TPM_CHECK(TlclAssertPhysicalPresence());
TPM_CHECK(TlclGetPermissions(INDEX0, &perm));
- assert((perm & perm_pp_gl) == perm_pp_gl);
+ assert((perm & PERMPPGL) == PERMPPGL);
TPM_CHECK(TlclGetPermissions(INDEX1, &perm));
- assert((perm & perm_pp) == perm_pp);
+ assert((perm & PERMPP) == PERMPP);
printf("TEST SUCCEEDED\n");
exit(0);