summaryrefslogtreecommitdiff
path: root/tests/vb2_misc_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vb2_misc_tests.c')
-rw-r--r--tests/vb2_misc_tests.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/vb2_misc_tests.c b/tests/vb2_misc_tests.c
index a9f82531..c2763e4e 100644
--- a/tests/vb2_misc_tests.c
+++ b/tests/vb2_misc_tests.c
@@ -228,8 +228,7 @@ static void gbb_tests(void)
TEST_SUCC(vb2_fw_parse_gbb(&ctx), "parse gbb");
/* Manually calculate the location of GBB since we have mocked out the
original definition of vb2_get_gbb. */
- struct vb2_gbb_header *current_gbb =
- (struct vb2_gbb_header *)((void *)sd + sd->gbb_offset);
+ struct vb2_gbb_header *current_gbb = vb2_member_of(sd, sd->gbb_offset);
TEST_SUCC(memcmp(&gbbsrc, current_gbb, sizeof(gbbsrc)),
"copy gbb contents");
TEST_EQ(used_before, ctx.workbuf_used - sizeof(gbbsrc),