Skip to content

Commit e30dfcc

Browse files
committed
dns: improved assignment
1 parent e9ed7bb commit e30dfcc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/cares_wrap.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,11 +1600,7 @@ void GetAddrInfo(const FunctionCallbackInfo<Value>& args) {
16001600
UNREACHABLE("bad address family");
16011601
}
16021602

1603-
Local<Uint32> order;
1604-
if (!args[4]->ToUint32(env->context()).ToLocal(&order)) {
1605-
THROW_ERR_INVALID_ARG_VALUE(env, "bad order");
1606-
return;
1607-
}
1603+
Local<Uint32> order = args[4].As<Uint32>();
16081604

16091605
auto req_wrap = std::make_unique<GetAddrInfoReqWrap>(env,
16101606
req_wrap_obj,

0 commit comments

Comments
 (0)