From: Felipe Pena Date: Fri, 2 Jan 2009 21:26:42 +0000 (+0000) Subject: - Working with unintialized errno (#46917, noticed by Jost Boekemeier) X-Git-Tag: php-5.4.0alpha1~191^2~4667 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05e0fb817985dd49af21d981b9628ff0331e7807;p=php - Working with unintialized errno (#46917, noticed by Jost Boekemeier) --- diff --git a/main/network.c b/main/network.c index 8e5bd2eea0..1dc3d281fb 100644 --- a/main/network.c +++ b/main/network.c @@ -1147,6 +1147,7 @@ PHPAPI int php_poll2(php_pollfd *ufds, unsigned int nfds, int timeout) tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000; } + errno = 0; n = select(max_fd + 1, &rset, &wset, &eset, timeout >= 0 ? &tv : NULL); if (n >= 0) {