From 00072a40bf8d9de91636885318c29ba890905017 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 14 Feb 2006 20:13:00 +0000 Subject: Force initialization of fd to -1 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3199 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/socket.cpp') diff --git a/src/socket.cpp b/src/socket.cpp index 836a2b5de..e43055260 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -46,6 +46,7 @@ InspSocket* socket_ref[MAX_DESCRIPTORS]; InspSocket::InspSocket() { this->state = I_DISCONNECTED; + this->fd = -1; } InspSocket::InspSocket(int newfd, char* ip) @@ -59,6 +60,7 @@ InspSocket::InspSocket(int newfd, char* ip) InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long maxtime) { + this->fd = -1; if (listening) { if ((this->fd = OpenTCPSocket()) == ERROR) { -- cgit v1.2.3