Skip to content

Commit 6830c47

Browse files
committed
Rename and remove last argument from win32 error to docref function.
1 parent 4b042a6 commit 6830c47

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char
11761176
/* }}} */
11771177

11781178
#ifdef PHP_WIN32
1179-
PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2) {
1179+
PHPAPI ZEND_COLD void php_win32_docref_from_error_with_param(DWORD error, const char *param) {
11801180
char *buf = php_win32_error_to_msg(error);
11811181
size_t buf_len;
11821182

@@ -1185,7 +1185,7 @@ PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *para
11851185
buf[buf_len - 1] = '\0';
11861186
buf[buf_len - 2] = '\0';
11871187
}
1188-
php_error_docref(NULL, E_WARNING, "%s (%s) (code: %lu)", buf, param1, error);
1188+
php_error_docref(NULL, E_WARNING, "%s (%s) (code: %lu)", buf, param, error);
11891189
php_win32_error_msg_free(buf);
11901190
}
11911191
#endif

main/php.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
344344
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
345345
PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
346346
#ifdef PHP_WIN32
347-
PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2);
347+
PHPAPI ZEND_COLD void php_win32_docref_from_error_with_param(DWORD error, const char *param);
348348
#endif
349349
END_EXTERN_C()
350350

main/streams/plain_wrapper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, const
982982

983983
#ifdef PHP_WIN32
984984
if (!dir) {
985-
php_win32_docref2_from_error(GetLastError(), path, path);
985+
php_win32_docref_from_error_with_param(GetLastError(), path);
986986
}
987987

988988
if (dir && dir->finished) {
@@ -1253,7 +1253,7 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_f
12531253
php_error_docref(NULL, E_WARNING, "(%s) %s", url_to, strerror(errno));
12541254
} else {
12551255
#ifdef PHP_WIN32
1256-
php_win32_docref2_from_error(GetLastError(), url_from, url_from);
1256+
php_win32_docref_from_error_with_param(GetLastError(), url_from);
12571257
#else
12581258
php_error_docref(NULL, E_WARNING, "%s (%s)", strerror(errno), url_from);
12591259
#endif

0 commit comments

Comments
 (0)