Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

greq/msg: simplify SnpGuestRequestMsgHdr::get_aad_slice() #400

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

00xc
Copy link
Member

@00xc 00xc commented Jul 1, 2024

Now that the offset_of macro is stable, simply use it to get the desired offset for the slice. Simplify also the slice creation by simply casting a *const Self to a *const u8 and calling slice::from_raw_parts with the adequate size.

Now that the offset_of macro is stable, simply use it to get the
desired offset for the slice. Simplify also the slice creation by
simply casting a *const Self to a *const u8 and calling
slice::from_raw_parts with the adequate size.

Signed-off-by: Carlos López <[email protected]>
@00xc 00xc requested a review from cclaudio July 1, 2024 09:49
Copy link
Member

@cclaudio cclaudio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks.

@00xc 00xc merged commit af0697e into coconut-svsm:main Jul 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants