diff options
author | midipix <writeonce@midipix.org> | 2016-11-19 18:54:18 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-19 18:54:18 -0500 |
commit | b7ba5f6a9f7dcfecfce52fea5c3af6e9700a24d8 (patch) | |
tree | ccd651261dd3fc4f0f0da89c563790ec6cd4d163 /src | |
parent | b8d16a54c152350766d1724c924c53c5bd3236fe (diff) | |
download | pemagine-b7ba5f6a9f7dcfecfce52fea5c3af6e9700a24d8.tar.bz2 pemagine-b7ba5f6a9f7dcfecfce52fea5c3af6e9700a24d8.tar.xz |
pe_get_image_opt_hdr_addr(): code maintenance.
Diffstat (limited to 'src')
-rw-r--r-- | src/headers/pe_get_image_opt_hdr_addr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/headers/pe_get_image_opt_hdr_addr.c b/src/headers/pe_get_image_opt_hdr_addr.c index d784aed..7fcd0ad 100644 --- a/src/headers/pe_get_image_opt_hdr_addr.c +++ b/src/headers/pe_get_image_opt_hdr_addr.c @@ -11,10 +11,12 @@ pe_api union pe_raw_opt_hdr * pe_get_image_opt_hdr_addr(const void * base) { - struct pe_raw_coff_file_hdr * coff; + struct pe_raw_coff_file_hdr * coff; + void * addr; if (!(coff = pe_get_image_coff_hdr_addr(base))) return 0; - else - return (union pe_raw_opt_hdr *)pe_va_from_rva(coff, sizeof(*coff)); + + addr = pe_va_from_rva(coff,sizeof(*coff)); + return (union pe_raw_opt_hdr *)addr; } |