Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Unified Diff: tests/tpm_lite/spaceperm.c

Issue 3551014: Fix build broken by assert() expanding to nothing. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: . Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firmware/version.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/tpm_lite/spaceperm.c
diff --git a/tests/tpm_lite/spaceperm.c b/tests/tpm_lite/spaceperm.c
index c49a1a99600f253efbddde6d7e9dd5bae9ae3234..13c3186211aedea0128e7046c0639e57742deeda 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);
« no previous file with comments | « firmware/version.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698