diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2017-06-19 12:55:59 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2017-06-19 12:55:59 +0300 |
| commit | 9c2a1f52a5f087c70a9e91dc1f43e5718d1bd8b6 (patch) | |
| tree | 3eb7097ebb986594ae03e54142240fca4b82e5f3 /ext/standard/proc_open.c | |
| parent | 6fe75aad6da55e7ce473109e219fdc80bf3b7a51 (diff) | |
| download | php-git-9c2a1f52a5f087c70a9e91dc1f43e5718d1bd8b6.tar.gz | |
Avoid useless dereferences and separations during paramter passing.
Diffstat (limited to 'ext/standard/proc_open.c')
| -rw-r--r-- | ext/standard/proc_open.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 6d048091c5..539d2c5b69 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -448,7 +448,7 @@ PHP_FUNCTION(proc_open) ZEND_PARSE_PARAMETERS_START(3, 6) Z_PARAM_STRING(command, command_len) Z_PARAM_ARRAY(descriptorspec) - Z_PARAM_ZVAL_DEREF_EX(pipes, 0, 1) + Z_PARAM_ZVAL_DEREF(pipes) Z_PARAM_OPTIONAL Z_PARAM_STRING_EX(cwd, cwd_len, 1, 0) Z_PARAM_ARRAY_EX(environment, 1, 0) @@ -874,10 +874,7 @@ PHP_FUNCTION(proc_open) #endif proc->env = env; - if (pipes != NULL) { - zval_dtor(pipes); - } - + zval_ptr_dtor(pipes); array_init(pipes); #if PHP_CAN_DO_PTS |
