comparison src/channel.c @ 8481:8924d7adbc22 v7.4.1531

commit https://github.com/vim/vim/commit/40e8cb292c36f5057628e570591e8917ac1ca121 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 10 21:10:58 2016 +0100 patch 7.4.1531 Problem: Compiler warning for unitinialized variable. (Dominique Pelle) Solution: Always give the variable a value.
author Christian Brabandt <cb@256bit.org>
date Thu, 10 Mar 2016 21:15:13 +0100
parents c08c6d19db4d
children daebcbd87bd3
comparison
equal deleted inserted replaced
8480:70fabc40d228 8481:8924d7adbc22
684 sock_close(sd); 684 sock_close(sd);
685 channel_free(channel); 685 channel_free(channel);
686 return NULL; 686 return NULL;
687 } 687 }
688 688
689 /* Limit the waittime to 50 msec. If it doesn't work within this
690 * time we close the socket and try creating it again. */
691 waitnow = waittime > 50 ? 50 : waittime;
692
689 /* If connect() didn't finish then try using select() to wait for the 693 /* If connect() didn't finish then try using select() to wait for the
690 * connection to be made. For Win32 always use select() to wait. */ 694 * connection to be made. For Win32 always use select() to wait. */
691 #ifndef WIN32 695 #ifndef WIN32
692 if (errno != ECONNREFUSED) 696 if (errno != ECONNREFUSED)
693 #endif 697 #endif
699 int so_error = 0; 703 int so_error = 0;
700 socklen_t so_error_len = sizeof(so_error); 704 socklen_t so_error_len = sizeof(so_error);
701 struct timeval start_tv; 705 struct timeval start_tv;
702 struct timeval end_tv; 706 struct timeval end_tv;
703 #endif 707 #endif
704 /* Limit the waittime to 50 msec. If it doesn't work within this
705 * time we close the socket and try creating it again. */
706 waitnow = waittime > 50 ? 50 : waittime;
707
708 FD_ZERO(&rfds); 708 FD_ZERO(&rfds);
709 FD_SET(sd, &rfds); 709 FD_SET(sd, &rfds);
710 FD_ZERO(&wfds); 710 FD_ZERO(&wfds);
711 FD_SET(sd, &wfds); 711 FD_SET(sd, &wfds);
712 712