From fef53e0131407861a8aad760ecda7b781712a6b9 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 19 Nov 2016 18:47:28 -0500 Subject: pe_get_image_dos_hdr_addr(): code maintenance. --- src/headers/pe_get_image_dos_hdr_addr.c | 8 +++----- 1 file 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 #include -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; } -- cgit v1.2.3