diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 18:43:44 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 18:43:44 +0300 |
commit | 9e709e2fa02b85d0d10c864d6c996e3368e977ce (patch) | |
tree | 148bedd2674933ba40e59f15fcfa2981f7aead85 /ext/posix | |
parent | 71eaf0d97f173093253163db8c4720bd62387e34 (diff) | |
download | php-git-9e709e2fa02b85d0d10c864d6c996e3368e977ce.tar.gz |
Move constants into read-only data segment
Diffstat (limited to 'ext/posix')
-rw-r--r-- | ext/posix/posix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 516b8f2318..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) @@ -1284,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]; @@ -1317,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" }, @@ -1378,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; |