summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-16 18:53:46 -0500
committermidipix <writeonce@midipix.org>2016-11-16 19:32:53 -0500
commita4928b6b97200021bc614060bc812692a222a9c6 (patch)
treeb2654a79dc1e7a947916b224f175269c6a590bf3 /src
parentf73f55d01def1e9d33c304a43d2e2e05822ba75e (diff)
downloadperk-a4928b6b97200021bc614060bc812692a222a9c6.tar.bz2
perk-a4928b6b97200021bc614060bc812692a222a9c6.tar.xz
reader: pe_read_import_header(): remove useless optimization.
Diffstat (limited to 'src')
-rw-r--r--src/reader/pe_read_import_header.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/reader/pe_read_import_header.c b/src/reader/pe_read_import_header.c
index d2b3acd..79f0f55 100644
--- a/src/reader/pe_read_import_header.c
+++ b/src/reader/pe_read_import_header.c
@@ -12,21 +12,13 @@
int pe_read_import_header(const struct pe_import_hdr * p, struct pe_meta_import_hdr * m)
{
- if (PERK_LITTLE_ENDIAN) {
+ m->import_lookup_tbl_rva = pe_read_long(p->import_lookup_tbl_rva);
+ m->time_date_stamp = pe_read_long(p->time_date_stamp);
+ m->forwarder_chain = pe_read_long(p->forwarder_chain);
+ m->name_rva = pe_read_long(p->name_rva);
+ m->import_addr_tbl_rva = pe_read_long(p->import_addr_tbl_rva);
- memcpy(m,p,sizeof(*p));
-
- } else {
-
- m->import_lookup_tbl_rva = pe_read_long(p->import_lookup_tbl_rva);
- m->time_date_stamp = pe_read_long(p->time_date_stamp);
- m->forwarder_chain = pe_read_long(p->forwarder_chain);
- m->name_rva = pe_read_long(p->name_rva);
- m->import_addr_tbl_rva = pe_read_long(p->import_addr_tbl_rva);
-
- }
-
- m->name = 0;
+ m->name = 0;
m->aitems = 0;
return 0;