diff options
Diffstat (limited to 'ext/standard/ftok.c')
| -rw-r--r-- | ext/standard/ftok.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index 2c1d72ff25..e9ec6b5eaa 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -1,6 +1,6 @@ -/* +/* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ @@ -20,7 +20,7 @@ #include "php.h" -#include <sys/types.h> +#include <sys/types.h> #ifdef HAVE_SYS_IPC_H #include <sys/ipc.h> @@ -32,30 +32,30 @@ PHP_FUNCTION(ftok) { char *pathname, *proj; - int pathname_len, proj_len; + size_t pathname_len, proj_len; key_t k; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ps", &pathname, &pathname_len, &proj, &proj_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &pathname, &pathname_len, &proj, &proj_len) == FAILURE) { return; } if (pathname_len == 0){ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Pathname is invalid"); + php_error_docref(NULL, E_WARNING, "Pathname is invalid"); RETURN_LONG(-1); } if (proj_len != 1){ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Project identifier is invalid"); + php_error_docref(NULL, E_WARNING, "Project identifier is invalid"); RETURN_LONG(-1); } - if (php_check_open_basedir(pathname TSRMLS_CC)) { + if (php_check_open_basedir(pathname)) { RETURN_LONG(-1); } k = ftok(pathname, proj[0]); if (k == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "ftok() failed - %s", strerror(errno)); + php_error_docref(NULL, E_WARNING, "ftok() failed - %s", strerror(errno)); } RETURN_LONG(k); |
