Remove duplicate checks for NULL pointers is_valid_address() already rejects NULL addresses, so there is no need to check address for NULL.
diff --git a/src/dlfcn.c b/src/dlfcn.c
index 2b2ea07..abbd58d 100644
--- a/src/dlfcn.c
+++ b/src/dlfcn.c
@@ -642,7 +642,7 @@ static BOOL fill_info( void *addr, Dl_info *info )
DLFCN_EXPORT
int dladdr( void *addr, Dl_info *info )
{
- if( addr == NULL || info == NULL )
+ if( info == NULL )
return 0;
if( !is_valid_address( addr ) )
@@ -678,9 +678,6 @@ int dladdr( void *addr, Dl_info *info )
addr = get_address_from_import_address_table( iat, iatSize, addr );
- if( addr == NULL )
- return 0;
-
if( !is_valid_address( addr ) )
return 0;
}