diff options
Diffstat (limited to 'server/NetworkController.cpp')
-rw-r--r-- | server/NetworkController.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/NetworkController.cpp b/server/NetworkController.cpp index 3e38d48e..e61ee306 100644 --- a/server/NetworkController.cpp +++ b/server/NetworkController.cpp @@ -827,11 +827,10 @@ bool NetworkController::isUidAllowed(unsigned netId, uid_t uid) const { Network* network = getNetworkLocked(netId); // Exempt when no netId is specified and there is no default network, so that apps or tests can // do DNS lookups for hostnames in etc/hosts. - if ((network && network->isUidAllowed(uid)) || - (netId == NETID_UNSET && mDefaultNetId == NETID_UNSET)) { + if (netId == NETID_UNSET && mDefaultNetId == NETID_UNSET) { return true; } - return false; + return network && network->isUidAllowed(uid); } bool NetworkController::isValidNetworkLocked(unsigned netId) const { |