OcMachoLib: Remove signature checks from functions that only use MachHeader as parameter to library functions that do perform that check.
@@ -38,10 +38,6 @@ MachoGetLastAddress64 (
ASSERT (MachHeader != NULL);
- if (MachHeader->Signature != MACH_HEADER_64_SIGNATURE) {
- return 0;
- }
-
LastAddress = 0;
for (
@@ -153,10 +149,6 @@ MachoGetUuid64 (
{
ASSERT (MachHeader != NULL);
- if (MachHeader->Signature != MACH_HEADER_64_SIGNATURE) {
- return NULL;
- }
-
return (MACH_UUID_COMMAND *)(
MachoGetFirstCommand64 (MachHeader, MACH_LOAD_COMMAND_UUID)
);
@@ -183,10 +175,6 @@ MachoGetSegmentByName64 (
ASSERT (MachHeader != NULL);
ASSERT (SegmentName != NULL);
- if (MachHeader->Signature != MACH_HEADER_64_SIGNATURE) {
- return NULL;
- }
-
for (
Segment = MachoGetFirstSegment64 (MachHeader);
Segment != NULL;
@@ -297,10 +285,6 @@ MachoGetSegmentSectionByName64 (
ASSERT (SegmentName != NULL);
ASSERT (SectionName != NULL);
- if (MachHeader->Signature != MACH_HEADER_64_SIGNATURE) {
- return NULL;
- }
-
Segment = MachoGetSegmentByName64 (MachHeader, SegmentName);
if (Segment != NULL) {
@@ -421,10 +405,6 @@ MachoGetSectionByIndex64 (
ASSERT (MachHeader != NULL);
- if (MachHeader->Signature != MACH_HEADER_64_SIGNATURE) {
- return NULL;
- }
-
SectionIndex = 0;
for (
@@ -463,10 +443,6 @@ MachoGetSectionByAddress64 (
ASSERT (MachHeader != NULL);
- if (MachHeader->Signature != MACH_HEADER_64_SIGNATURE) {
- return NULL;
- }
-
for (
Segment = MachoGetFirstSegment64 (MachHeader);
Segment != NULL;
