summaryrefslogtreecommitdiff
path: root/sapi/litespeed
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-16 16:21:45 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-16 16:44:37 +0200
commit46faf8f018e95de27873dbcf7c094af18c4c08e4 (patch)
treeedd85291c8c8070f3182617152098c9289242e6e /sapi/litespeed
parent349a388b90e767da9128efe6da0e4ebf5c752092 (diff)
downloadphp-git-46faf8f018e95de27873dbcf7c094af18c4c08e4.tar.gz
Introduce zend_stream_init_fp() API
Reduce the amount of code that mucks around with zend_file_handle initialization.
Diffstat (limited to 'sapi/litespeed')
-rw-r--r--sapi/litespeed/lsapi_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 1c577c9459..bec0eacb81 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -1296,9 +1296,7 @@ static int cli_main( int argc, char * argv[] )
if ( ret == -1 ) {
if ( *p ) {
zend_file_handle file_handle;
- memset(&file_handle, 0, sizeof(file_handle));
- file_handle.type = ZEND_HANDLE_FP;
- file_handle.handle.fp = VCWD_FOPEN(*p, "rb");
+ zend_stream_init_fp(&file_handle, VCWD_FOPEN(*p, "rb"), NULL);
if ( file_handle.handle.fp ) {
script_filename = *p;