From e30dfcca438c59b10e5cdf9b054c0a618c41dfa6 Mon Sep 17 00:00:00 2001 From: Paolo Insogna Date: Wed, 17 Apr 2024 11:17:39 +0200 Subject: [PATCH] dns: improved assignment --- src/cares_wrap.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 08703fcf542a4b..c5dd24e1013c61 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1600,11 +1600,7 @@ void GetAddrInfo(const FunctionCallbackInfo& args) { UNREACHABLE("bad address family"); } - Local order; - if (!args[4]->ToUint32(env->context()).ToLocal(&order)) { - THROW_ERR_INVALID_ARG_VALUE(env, "bad order"); - return; - } + Local order = args[4].As(); auto req_wrap = std::make_unique(env, req_wrap_obj,