summaryrefslogtreecommitdiffhomepage
path: root/src/headers
diff options
context:
space:
mode:
Diffstat (limited to 'src/headers')
-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;
}