1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove unnecessary NULL assignments after ecalloc in streams (#11209)

ecalloc already zeroes the structure, so writing NULL is not necessary.
This commit is contained in:
Niels Dossche
2023-05-09 19:46:45 +02:00
committed by GitHub
parent 173680acd3
commit acc940645e
2 changed files with 0 additions and 2 deletions

View File

@@ -2315,7 +2315,6 @@ PHPAPI php_stream_context *php_stream_context_alloc(void)
php_stream_context *context;
context = ecalloc(1, sizeof(php_stream_context));
context->notifier = NULL;
array_init(&context->options);
context->res = zend_register_resource(context, php_le_stream_context());

View File

@@ -469,7 +469,6 @@ PHP_FUNCTION(stream_wrapper_register)
uwrap->wrapper.wops = &user_stream_wops;
uwrap->wrapper.abstract = uwrap;
uwrap->wrapper.is_url = ((flags & PHP_STREAM_IS_URL) != 0);
uwrap->resource = NULL;
rsrc = zend_register_resource(uwrap, le_protocols);