Skip to content

Commit 8440178

Browse files
committed
improvement
1 parent 330a5e6 commit 8440178

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

source/yail.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,8 @@ namespace
7272

7373
const auto* ntdll = GetModuleHandleA("ntdll.dll");
7474
for (const auto* sig : signatures)
75-
{
76-
const auto result = omath::PePatternScanner::scan_for_pattern_in_loaded_module(ntdll, sig);
77-
if (result)
75+
if (const auto result = omath::PePatternScanner::scan_for_pattern_in_loaded_module(ntdll, sig))
7876
return reinterpret_cast<RtlInsertInvertedFunctionTableFn>(result.value());
79-
}
8077

8178
throw std::runtime_error{"Failed to find RtlInsertInvertedFunctionTable"};
8279
}

0 commit comments

Comments
 (0)