mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
boot/efi: use Header field of hd directly instead of casting to EFI_DEVICE_PATH
The header of EFI_DEVICE_PATH is the first member of hd, which means that we can use that directly instead of casting one struct to another.
This commit is contained in:
parent
aa9ff6c28d
commit
ed0cf4171f
@ -232,7 +232,7 @@ static EFI_STATUS find_device(const EFI_GUID *type, EFI_HANDLE *device, EFI_DEVI
|
||||
}
|
||||
|
||||
/* Patch in the data we found */
|
||||
*ret_device_path = device_path_replace_node(partition_path, part_node, (EFI_DEVICE_PATH *) &hd);
|
||||
*ret_device_path = device_path_replace_node(partition_path, part_node, &hd.Header);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user