Skip to content

Commit 18358dc

Browse files
committed
Remove TODO-comment about safety of casting ptr to *mut u8
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent 8b43e9f commit 18358dc

File tree

1 file changed

+1
-1
lines changed
  • kvm-ioctls/src/ioctls

1 file changed

+1
-1
lines changed

kvm-ioctls/src/ioctls/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ impl VmFd {
668668
dst.flags = src.flags.bits();
669669
dst.nmsrs = src.msr_count;
670670
dst.base = src.base;
671-
dst.bitmap = src.bitmap.as_ptr() as *mut u8; // TODO: is this cast ok? kvm_msr_filter_range.bitmap is __*mut__ u8. Ideally I don't want to require input parameters to be mutable unless it's necessary
671+
dst.bitmap = src.bitmap.as_ptr() as *mut u8; // The ioctl doesn't modify the bitmap, so this cast is safe.
672672
}
673673

674674
// SAFETY: We checked the length of all bitmaps above.

0 commit comments

Comments
 (0)