mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-21 16:57:44 +02:00
ImageTool: Replace QuickSort with qsort
This commit is contained in:
parent
c19c448b0f
commit
ed40e08291
@ -432,11 +432,10 @@ ToolImageRelocate (
|
||||
}
|
||||
|
||||
static
|
||||
INTN
|
||||
EFIAPI
|
||||
int
|
||||
ToolImageRelocCompare (
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
IN const void *Buffer1,
|
||||
IN const void *Buffer2
|
||||
)
|
||||
{
|
||||
const image_tool_reloc_t *Reloc1;
|
||||
@ -461,18 +460,15 @@ ToolImageSortRelocs (
|
||||
image_tool_image_info_t *Image
|
||||
)
|
||||
{
|
||||
image_tool_reloc_t OneElement;
|
||||
|
||||
if (Image->RelocInfo.Relocs == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
QuickSort (
|
||||
qsort (
|
||||
Image->RelocInfo.Relocs,
|
||||
Image->RelocInfo.NumRelocs,
|
||||
sizeof (*Image->RelocInfo.Relocs),
|
||||
ToolImageRelocCompare,
|
||||
&OneElement
|
||||
ToolImageRelocCompare
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user