Fix bogus error checking on unique_fd
The expression "!fd" calls the implicit conversion to int, but comparing the raw fd against 0 does not work, since open() and other POSIX calls returning a file descriptor use -1 to signal an error. Test: m libnetd_resolv Test: sync, then atest resolver_integration_test Change-Id: I876fe64a5507a0863151b6807990fdfa72e2973e
Loading
Please register or sign in to comment