summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorRichard Fussenegger <fleshgrinder@users.noreply.github.com>2017-05-29 21:42:59 +0200
committerAnatol Belski <ab@php.net>2017-06-15 23:48:03 +0200
commit5fa1cd224b3801a99790f367feca4d98b53771b7 (patch)
tree7703852ac99aab1f64981bd32fa376dba34f6c70 /sapi
parentfb6e718764fa33f0f4461c485cd12b89613db9c6 (diff)
downloadphp-git-5fa1cd224b3801a99790f367feca4d98b53771b7.tar.gz
Fixed php_socket_t to int conversion
This warning was about a possible loss of data due to the downcast of `php_socket_t` to `int`. The former maps to a platform specific type, hence, it might downcast from a 64 bit integer to a 32 bit intger. Fixed possibly overflowing vars Due to the change from `int` to `php_socket_t` some variables might overflow now. Changed all variables that might be affected. Revert "Fixed possibly overflowing vars" This reverts commit bf64fd5984409a208ef32108990a6085b6556273. Use aliased PHP socket type Using the alias protects us from changes to the underlying type. Removed ignored nfds argument The `nfds` argument to the Win32 `select` function is always ignored, regardless of its actual value. Hence, we should not pass it in the first place. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx for reference. Target value is not a pointer Avoid overflow in loop
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cli/php_cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 0ff8b4103f..07e8a8c803 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -248,7 +248,7 @@ static void print_extensions(void) /* {{{ */
#define STDERR_FILENO 2
#endif
-static inline int sapi_cli_select(int fd)
+static inline int sapi_cli_select(php_socket_t fd)
{
fd_set wfd, dfd;
struct timeval tv;