diff options
author | midipix <writeonce@midipix.org> | 2016-11-19 18:47:28 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-19 18:47:28 -0500 |
commit | fef53e0131407861a8aad760ecda7b781712a6b9 (patch) | |
tree | 823a6dfb753b47f7c51d2a68d40b090a31039956 | |
parent | 22d1575133aef057f6a62a2709500033e9df58a4 (diff) | |
download | pemagine-fef53e0131407861a8aad760ecda7b781712a6b9.tar.bz2 pemagine-fef53e0131407861a8aad760ecda7b781712a6b9.tar.xz |
pe_get_image_dos_hdr_addr(): code maintenance.
-rw-r--r-- | src/headers/pe_get_image_dos_hdr_addr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/headers/pe_get_image_dos_hdr_addr.c b/src/headers/pe_get_image_dos_hdr_addr.c index a18f1df..0b68d71 100644 --- a/src/headers/pe_get_image_dos_hdr_addr.c +++ b/src/headers/pe_get_image_dos_hdr_addr.c @@ -10,15 +10,13 @@ #include <pemagine/pe_structs.h> #include <pemagine/pemagine.h> -pe_api + struct pe_raw_image_dos_hdr * pe_get_image_dos_hdr_addr(const void * base) { struct pe_raw_image_dos_hdr * dos; dos = (struct pe_raw_image_dos_hdr *)base; - if ((dos->dos_magic[0] == 'M') && (dos->dos_magic[1] == 'Z')) - return dos; - else - return 0; + return ((dos->dos_magic[0] == 'M') && (dos->dos_magic[1] == 'Z')) + ? dos : 0; } |