Skip to content

dns: remove unreachable code

Rodrigo Muino Tomonari requested to merge github/fork/Trott/void-void-void into master

cares_wrap.getaddrinfo() and cares_wrap.getnameinfo() map to void C++ functions. They cannot return a truthy value. Remove the checks for return values from these functions in lib/dns.js. Remove the checks.

These checks were covered in tests by using --expose-internals and monkey-patching cares_wrap.getaddrinfo()/cares_wrap.getnameinfo(). Remove these tests.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading