summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-19 13:01:08 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-19 13:01:08 +0000
commit946272e8b4da1399ac5cda699153201161124de2 (patch)
tree25a5e2012672dab8e6df60148eda9916351d8514 /stream
parent79918649e264bbc42d61bfd1b1de35d5570cb99d (diff)
downloadmpv-946272e8b4da1399ac5cda699153201161124de2.tar.bz2
mpv-946272e8b4da1399ac5cda699153201161124de2.tar.xz
(Re)move idiotic checks, ret can't be < 0 or > 0 if the loop condition
is that it is == 0! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24579 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/tcp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stream/tcp.c b/stream/tcp.c
index bf5f06c820..def97a4564 100644
--- a/stream/tcp.c
+++ b/stream/tcp.c
@@ -195,9 +195,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
FD_SET( socket_server_fd, &set );
// When the connection will be made, we will have a writeable fd
while((ret = select(socket_server_fd+1, NULL, &set, NULL, &tv)) == 0) {
- if( ret<0 ) mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_SelectFailed);
- else if(ret > 0) break;
- else if(count > 30 || mp_input_check_interrupt(500)) {
+ if(count > 30 || mp_input_check_interrupt(500)) {
if(count > 30)
mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ConnTimeout);
else
@@ -210,6 +208,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
tv.tv_sec = 0;
tv.tv_usec = 500000;
}
+ if (ret < 0) mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_SelectFailed);
// Turn back the socket as blocking
#ifndef HAVE_WINSOCK2