mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user