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