summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-16 18:52:31 -0500
committermidipix <writeonce@midipix.org>2016-11-16 19:32:53 -0500
commitf73f55d01def1e9d33c304a43d2e2e05822ba75e (patch)
treec1ab9bcf21e0b51e09e1e41ceaa045261fcdbe0e
parent4d1375c67e0e2b91395777d811473beff7f409b2 (diff)
downloadperk-f73f55d01def1e9d33c304a43d2e2e05822ba75e.tar.bz2
perk-f73f55d01def1e9d33c304a43d2e2e05822ba75e.tar.xz
reader: pe_read_export_header(): remove useless optimization.
-rw-r--r--src/reader/pe_read_export_header.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/src/reader/pe_read_export_header.c b/src/reader/pe_read_export_header.c
index 545b81e..a8f454c 100644
--- a/src/reader/pe_read_export_header.c
+++ b/src/reader/pe_read_export_header.c
@@ -12,27 +12,19 @@
int pe_read_export_header(const struct pe_export_hdr * p, struct pe_meta_export_hdr * m)
{
- if (PERK_LITTLE_ENDIAN) {
-
- memcpy(m,p,sizeof(*p));
-
- } else {
-
- m->export_flags = pe_read_long(p->export_flags);
- m->time_date_stamp = pe_read_long(p->time_date_stamp);
-
- m->major_ver = pe_read_short(p->major_ver);
- m->minor_ver = pe_read_short(p->minor_ver);
-
- m->name_rva = pe_read_long(p->name_rva);
- m->ordinal_base = pe_read_long(p->ordinal_base);
- m->addr_tbl_entries = pe_read_long(p->addr_tbl_entries);
- m->num_of_name_ptrs = pe_read_long(p->num_of_name_ptrs);
- m->export_addr_tbl_rva = pe_read_long(p->export_addr_tbl_rva);
- m->name_ptr_rva = pe_read_long(p->name_ptr_rva);
- m->ordinal_tbl_rva = pe_read_long(p->ordinal_tbl_rva);
-
- }
+ m->export_flags = pe_read_long(p->export_flags);
+ m->time_date_stamp = pe_read_long(p->time_date_stamp);
+
+ m->major_ver = pe_read_short(p->major_ver);
+ m->minor_ver = pe_read_short(p->minor_ver);
+
+ m->name_rva = pe_read_long(p->name_rva);
+ m->ordinal_base = pe_read_long(p->ordinal_base);
+ m->addr_tbl_entries = pe_read_long(p->addr_tbl_entries);
+ m->num_of_name_ptrs = pe_read_long(p->num_of_name_ptrs);
+ m->export_addr_tbl_rva = pe_read_long(p->export_addr_tbl_rva);
+ m->name_ptr_rva = pe_read_long(p->name_ptr_rva);
+ m->ordinal_tbl_rva = pe_read_long(p->ordinal_tbl_rva);
return 0;
}