fix datatype mismatch

This commit is contained in:
Anatol Belski 2014-10-27 17:31:38 +01:00
parent 9858df2f80
commit 0f5858e3a3

View File

@ -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,