summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 18:47:28 -0500
committermidipix <writeonce@midipix.org>2016-11-19 18:47:28 -0500
commitfef53e0131407861a8aad760ecda7b781712a6b9 (patch)
tree823a6dfb753b47f7c51d2a68d40b090a31039956
parent22d1575133aef057f6a62a2709500033e9df58a4 (diff)
downloadpemagine-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.c8
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;
}