com php-src: fix datatype mismatch and unused var warning: main/network.c

From: Date: Tue, 11 Nov 2014 19:16:13 +0000
Subject: com php-src: fix datatype mismatch and unused var warning: main/network.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83022@lists.php.net to get a copy of this message
Commit: 0e6c7c6165127b8966752433726cbafa92afc5d3 Author: Anatol Belski <ab@php.net> Tue, 11 Nov 2014 20:16:13 +0100 Parents: 524f854193ef1f169fb649feb6010439379aba5c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e6c7c6165127b8966752433726cbafa92afc5d3 Log: fix datatype mismatch and unused var warning Changed paths: M main/network.c Diff: diff --git a/main/network.c b/main/network.c index 9fd1285..f44cad2 100644 --- a/main/network.c +++ b/main/network.c @@ -1126,17 +1126,19 @@ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short p PHPAPI int php_set_sock_blocking(php_socket_t socketd, int block TSRMLS_DC) { int ret = SUCCESS; - int flags; - int myflag = 0; #ifdef PHP_WIN32 + u_long flags; + /* with ioctlsocket, a non-zero sets nonblocking, a zero sets blocking */ flags = !block; if (ioctlsocket(socketd, FIONBIO, &flags) == SOCKET_ERROR) { ret = FAILURE; } #else - flags = fcntl(socketd, F_GETFL); + int myflag = 0; + int flags = fcntl(socketd, F_GETFL); + #ifdef O_NONBLOCK myflag = O_NONBLOCK; /* POSIX version */ #elif defined(O_NDELAY)

« previous php.cvs (#83022) next »