com php-src: fix datatype mismatch: main/streams/xp_socket. c
| From: | Anatol Belski | Date: | Mon, 27 Oct 2014 16:31:38 +0000 |
| Subject: | com php-src: fix datatype mismatch: main/streams/xp_socket. c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82712@lists.php.net to get a copy of this message | ||
Commit: 0f5858e3a3283514f97b9fee539a38b68e0698da
Author: Anatol Belski <ab@php.net> Mon, 27 Oct 2014 17:31:38 +0100
Parents: 9858df2f8071dd4864fd5db6d09a18ebca026975
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f5858e3a3283514f97b9fee539a38b68e0698da
Log:
fix datatype mismatch
Changed paths:
M main/streams/xp_socket.c
Diff:
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index bce6a09..746d9c9 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -251,7 +251,11 @@ static inline int sock_sendto(php_netstream_data_t *sock, const char *buf,
size_
return (ret == SOCK_CONN_ERR) ? -1 : ret;
}
+#ifdef PHP_WIN32
+ return ((ret = send(sock->socket, buf, buflen > INT_MAX ? INT_MAX : (int)buflen, flags)) ==
SOCK_CONN_ERR) ? -1 : ret;
+#else
return ((ret = send(sock->socket, buf, buflen, flags)) == SOCK_CONN_ERR) ? -1 : ret;
+#endif
}
static inline int sock_recvfrom(php_netstream_data_t *sock, char *buf, size_t buflen, int flags,