From a4928b6b97200021bc614060bc812692a222a9c6 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 16 Nov 2016 18:53:46 -0500 Subject: reader: pe_read_import_header(): remove useless optimization. --- src/reader/pe_read_import_header.c | 20 ++++++-------------- 1 file 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; -- cgit v1.2.3