ntdll: Remove some unnecessary NULL checks for current_importer.

current_importer is now set by all callers of build_import_name,
find_forwarded_export, and find_ordinal_export.
This commit is contained in:
Jinoh Kang 2024-04-18 23:23:32 +09:00
parent c17600b062
commit 70c7ad699e

View file

@ -825,7 +825,7 @@ static NTSTATUS build_import_name( WCHAR buffer[256], const char *import, int le
{
const API_SET_NAMESPACE *map = NtCurrentTeb()->Peb->ApiSetMap;
const API_SET_NAMESPACE_ENTRY *entry;
const WCHAR *host = current_importer ? current_importer->modref->ldr.BaseDllName.Buffer : NULL;
const WCHAR *host = current_importer->modref->ldr.BaseDllName.Buffer;
UNICODE_STRING str;
while (len && import[len-1] == ' ') len--; /* remove trailing spaces */
@ -1009,7 +1009,7 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
if (load_dll( load_path, mod_name, 0, &wm, imp->system ) == STATUS_SUCCESS &&
!(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS))
{
if (!imports_fixup_done && current_importer)
if (!imports_fixup_done)
{
add_module_dependency( current_importer->modref->ldr.DdagNode, wm->ldr.DdagNode );
}