mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02: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:
parent
173680acd3
commit
acc940645e
2 changed files with 0 additions and 2 deletions
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue