Skip to content

Commit acc9406

Browse files
authored
Remove unnecessary NULL assignments after ecalloc in streams (#11209)
ecalloc already zeroes the structure, so writing NULL is not necessary.
1 parent 173680a commit acc9406

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

main/streams/streams.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,6 @@ PHPAPI php_stream_context *php_stream_context_alloc(void)
23152315
php_stream_context *context;
23162316

23172317
context = ecalloc(1, sizeof(php_stream_context));
2318-
context->notifier = NULL;
23192318
array_init(&context->options);
23202319

23212320
context->res = zend_register_resource(context, php_le_stream_context());

main/streams/userspace.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@ PHP_FUNCTION(stream_wrapper_register)
469469
uwrap->wrapper.wops = &user_stream_wops;
470470
uwrap->wrapper.abstract = uwrap;
471471
uwrap->wrapper.is_url = ((flags & PHP_STREAM_IS_URL) != 0);
472-
uwrap->resource = NULL;
473472

474473
rsrc = zend_register_resource(uwrap, le_protocols);
475474

0 commit comments

Comments
 (0)