diff options
author | Joel Kitching <kitching@google.com> | 2019-08-29 13:18:18 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-05 14:29:05 +0000 |
commit | 84f685035fbfb44d9b389bfa7ee441dcabac95a2 (patch) | |
tree | ea18b75fbef499083c9e477fd5bba8a15a5ca9be | |
parent | a8b61f6ff9e6686b16a4017fdd6c8c1c3308dc81 (diff) | |
download | vboot-84f685035fbfb44d9b389bfa7ee441dcabac95a2.tar.gz |
vboot/secdata: fix up macros in rollback_index.c
Remove the unnecessary offsetof declaration in
rollback_index.c, and fix some macro formatting.
BUG=b:124141368, chromium:972956
TEST=make clean && make runtests
BRANCH=none
Change-Id: I156a0561070e03f978fff307d3dbfafde09e0adf
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1773093
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r-- | firmware/lib/rollback_index.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c index 004d3ba0..b273d23d 100644 --- a/firmware/lib/rollback_index.c +++ b/firmware/lib/rollback_index.c @@ -14,17 +14,13 @@ #include "tss_constants.h" #include "vboot_api.h" -#ifndef offsetof -#define offsetof(A,B) __builtin_offsetof(A,B) -#endif - -#define RETURN_ON_FAILURE(tpm_command) do { \ - uint32_t result_; \ - if ((result_ = (tpm_command)) != TPM_SUCCESS) { \ +#define RETURN_ON_FAILURE(tpm_command) do { \ + uint32_t result_; \ + if ((result_ = (tpm_command)) != TPM_SUCCESS) { \ VB2_DEBUG("Rollback: %08x returned by " #tpm_command \ - "\n", (int)result_); \ - return result_; \ - } \ + "\n", (int)result_); \ + return result_; \ + } \ } while (0) #define PRINT_BYTES(title, value) do { \ |