Skip to content

Commit

Permalink
OrcLib: Text: in_addr: use NtError
Browse files Browse the repository at this point in the history
  • Loading branch information
jgautier-anssi authored and fabienfl-orc committed Jun 4, 2024
1 parent f86aebe commit 11f6db3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/OrcLib/Text/in_addr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RtlIpv4AddressToStringExAApi(const in_addr* Address, USHORT Port, PSTR AddressSt
auto status = fn(Address, Port, AddressString, AddressStringLength);
if (!NT_SUCCESS(status))
{
return std::error_code(HRESULT_FROM_NT(status), std::system_category());
return Orc::NtError(status);
}

return Orc::Success<void>();
Expand All @@ -58,7 +58,7 @@ RtlIpv4AddressToStringExWApi(const in_addr* Address, USHORT Port, PWSTR AddressS
auto status = fn(Address, Port, AddressString, AddressStringLength);
if (!NT_SUCCESS(status))
{
return std::error_code(HRESULT_FROM_NT(status), std::system_category());
return Orc::NtError(status);
}

return Orc::Success<void>();
Expand Down Expand Up @@ -88,7 +88,7 @@ Orc::Result<void> RtlIpv6AddressToStringExAApi(
auto status = fn(Address, ScopeId, Port, AddressString, AddressStringLength);
if (!NT_SUCCESS(status))
{
return std::error_code(HRESULT_FROM_NT(status), std::system_category());
return Orc::NtError(status);
}

return Orc::Success<void>();
Expand Down Expand Up @@ -118,7 +118,7 @@ Orc::Result<void> RtlIpv6AddressToStringExWApi(
auto status = fn(Address, ScopeId, Port, AddressString, AddressStringLength);
if (!NT_SUCCESS(status))
{
return std::error_code(HRESULT_FROM_NT(status), std::system_category());
return Orc::NtError(status);
}

return Orc::Success<void>();
Expand Down

0 comments on commit 11f6db3

Please sign in to comment.