Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1784)

Unified Diff: net/udp/udp_socket_posix.cc

Issue 2453873004: Simplify if condition in UDPSocket::RandomBind (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/udp/udp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_socket_posix.cc
diff --git a/net/udp/udp_socket_posix.cc b/net/udp/udp_socket_posix.cc
index d294c857e6e2ab79a5b8cfbe703ed6f6498783ea..9939ce2e217578b2e7d37ffcc268f249b69b7ddc 100644
--- a/net/udp/udp_socket_posix.cc
+++ b/net/udp/udp_socket_posix.cc
@@ -738,7 +738,7 @@ int UDPSocketPosix::RandomBind(const IPAddress& address) {
for (int i = 0; i < kBindRetries; ++i) {
int rv = DoBind(IPEndPoint(address,
rand_int_cb_.Run(kPortStart, kPortEnd)));
- if (rv == OK || rv != ERR_ADDRESS_IN_USE)
+ if (rv != ERR_ADDRESS_IN_USE)
return rv;
}
return DoBind(IPEndPoint(address, 0));
« no previous file with comments | « no previous file | net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698