]> granicus.if.org Git - php/commitdiff
nuke unused variable warning
authorfoobar <sniper@php.net>
Sat, 13 Jul 2002 07:10:59 +0000 (07:10 +0000)
committerfoobar <sniper@php.net>
Sat, 13 Jul 2002 07:10:59 +0000 (07:10 +0000)
ext/standard/fsock.c

index 7b57267e2d48d170c3883f4cf6b2852f3161ffe8..0f8646fb28cd14eb3567e0e7ac214be771800749 100644 (file)
@@ -121,7 +121,6 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        char *host;
        int host_len;
        int port = -1;
-       int err;
        zval *zerrno = NULL, *zerrstr = NULL;
        double timeout = 60;
        unsigned long conv;
@@ -193,9 +192,14 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                else
 #endif
                stream = php_stream_sock_open_host(host, (unsigned short)port, socktype, (int)timeout, persistent);
+
 #ifdef PHP_WIN32
-               /* Preserve error */
-               err = WSAGetLastError();
+               {
+                       int err;
+       
+                       /* Preserve error */
+                       err = WSAGetLastError();
+               }
 #endif
 
                if (stream == NULL) {