mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +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 */
|
/* 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;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user