diff options
Diffstat (limited to 'ext/posix/posix.c')
-rw-r--r-- | ext/posix/posix.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/ext/posix/posix.c b/ext/posix/posix.c index bb23a5bc29..cdcedb9658 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -224,7 +224,7 @@ ZEND_END_ARG_INFO() /* {{{ posix_functions[] */ -const zend_function_entry posix_functions[] = { +static const zend_function_entry posix_functions[] = { /* POSIX.1, 3.3 */ PHP_FE(posix_kill, arginfo_posix_kill) @@ -805,8 +805,7 @@ PHP_FUNCTION(posix_ttyname) } break; default: - convert_to_long_ex(z_fd); - fd = Z_LVAL_P(z_fd); + fd = zval_get_long(z_fd); } #if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX) buflen = sysconf(_SC_TTY_NAME_MAX); @@ -850,8 +849,7 @@ PHP_FUNCTION(posix_isatty) } break; default: - convert_to_long_ex(z_fd); - fd = Z_LVAL_P(z_fd); + fd = zval_get_long(z_fd); } if (isatty(fd)) { @@ -1286,7 +1284,7 @@ PHP_FUNCTION(posix_getpwuid) /* {{{ posix_addlimit */ -static int posix_addlimit(int limit, char *name, zval *return_value) { +static int posix_addlimit(int limit, const char *name, zval *return_value) { int result; struct rlimit rl; char hard[80]; @@ -1319,9 +1317,9 @@ static int posix_addlimit(int limit, char *name, zval *return_value) { /* {{{ limits[] */ -struct limitlist { +static const struct limitlist { int limit; - char *name; + const char *name; } limits[] = { #ifdef RLIMIT_CORE { RLIMIT_CORE, "core" }, @@ -1380,7 +1378,7 @@ struct limitlist { Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally) */ PHP_FUNCTION(posix_getrlimit) { - struct limitlist *l = NULL; + const struct limitlist *l = NULL; PHP_POSIX_NO_ARGS; |