Skip to content

Commit 85fc576

Browse files
committed
streams: remove parameters that always passed NULL or unused
1 parent 0641165 commit 85fc576

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

main/streams/stream_errors.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ PHPAPI php_stream_error_operation *php_stream_error_operation_begin(void)
326326
}
327327

328328
static void php_stream_error_add(zend_enum_StreamErrorCode code, const char *wrapper_name,
329-
zend_string *message, const char *docref, char *param, int severity, bool terminating)
329+
zend_string *message, const char *docref, int severity, bool terminating)
330330
{
331331
php_stream_error_operation *op = FG(stream_error_state).current_operation;
332332
ZEND_ASSERT(op != NULL);
@@ -335,7 +335,7 @@ static void php_stream_error_add(zend_enum_StreamErrorCode code, const char *wra
335335
entry->message = message;
336336
entry->code = code;
337337
entry->wrapper_name = wrapper_name ? estrdup(wrapper_name) : NULL;
338-
entry->param = param;
338+
entry->param = NULL;
339339
entry->docref = docref ? estrdup(docref) : NULL;
340340
entry->severity = severity;
341341
entry->terminating = terminating;
@@ -575,15 +575,15 @@ PHPAPI void php_stream_error_operation_abort(void)
575575
/* Wrapper error reporting */
576576

577577
static void php_stream_wrapper_error_internal(const char *wrapper_name, php_stream_context *context,
578-
const char *docref, int options, int severity, bool terminating,
579-
zend_enum_StreamErrorCode code, char *param, zend_string *message)
578+
const char *docref, int severity, bool terminating,
579+
zend_enum_StreamErrorCode code, zend_string *message)
580580
{
581581
bool implicit_operation = (FG(stream_error_state).current_operation == NULL);
582582
if (implicit_operation) {
583583
php_stream_error_operation_begin();
584584
}
585585

586-
php_stream_error_add(code, wrapper_name, message, docref, param, severity, terminating);
586+
php_stream_error_add(code, wrapper_name, message, docref, severity, terminating);
587587

588588
if (implicit_operation) {
589589
php_stream_error_operation_end(context);
@@ -604,7 +604,7 @@ PHPAPI void php_stream_wrapper_error_with_name(const char *wrapper_name,
604604
va_end(args);
605605

606606
php_stream_wrapper_error_internal(
607-
wrapper_name, context, docref, options, severity, terminating, code, NULL, message);
607+
wrapper_name, context, docref, severity, terminating, code, message);
608608
}
609609

610610
PHPAPI void php_stream_wrapper_error(php_stream_wrapper *wrapper, php_stream_context *context,
@@ -623,7 +623,7 @@ PHPAPI void php_stream_wrapper_error(php_stream_wrapper *wrapper, php_stream_con
623623
const char *wrapper_name = PHP_STREAM_ERROR_WRAPPER_NAME(wrapper);
624624

625625
php_stream_wrapper_error_internal(
626-
wrapper_name, context, docref, options, severity, terminating, code, NULL, message);
626+
wrapper_name, context, docref, severity, terminating, code, message);
627627
}
628628

629629
/* Stream error reporting */
@@ -641,8 +641,8 @@ PHPAPI void php_stream_error(php_stream *stream, const char *docref, int severit
641641

642642
php_stream_context *context = PHP_STREAM_CONTEXT(stream);
643643

644-
php_stream_wrapper_error_internal(wrapper_name, context, docref, REPORT_ERRORS, severity,
645-
terminating, code, NULL, message);
644+
php_stream_wrapper_error_internal(wrapper_name, context, docref, severity,
645+
terminating, code, message);
646646
}
647647

648648
/* Legacy wrapper error logging */
@@ -705,7 +705,7 @@ PHPAPI void php_stream_wrapper_log_error(const php_stream_wrapper *wrapper,
705705

706706
if (options & REPORT_ERRORS) {
707707
php_stream_wrapper_error_internal(
708-
wrapper_name, context, NULL, options, severity, terminating, code, NULL, message);
708+
wrapper_name, context, NULL, severity, terminating, code, message);
709709
} else {
710710
php_stream_wrapper_log_store_error(
711711
message, code, wrapper_name, severity, terminating);
@@ -784,8 +784,8 @@ PHPAPI void php_stream_display_wrapper_name_errors(const char *wrapper_name,
784784

785785
zend_string *message = strpprintf(0, "%s: %s", caption, msg);
786786

787-
php_stream_wrapper_error_internal(wrapper_name, context, NULL, REPORT_ERRORS, E_WARNING, true,
788-
code, NULL, message);
787+
php_stream_wrapper_error_internal(wrapper_name, context, NULL, E_WARNING, true,
788+
code, message);
789789

790790
if (free_msg) {
791791
efree(msg);

0 commit comments

Comments
 (0)