mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Drop useless retrieval of opened_path (GH-16522)
There is no point in retrieving the real path, if we don't use it.
This commit is contained in:
parent
eef3e5ebca
commit
65f885738d
1 changed files with 1 additions and 5 deletions
|
@ -823,14 +823,10 @@ restart:
|
||||||
} else {
|
} else {
|
||||||
spprintf(&lock_name, 0, "%s.lck", ZSTR_VAL(connection->info->path));
|
spprintf(&lock_name, 0, "%s.lck", ZSTR_VAL(connection->info->path));
|
||||||
if (!strcmp(file_mode, "r")) {
|
if (!strcmp(file_mode, "r")) {
|
||||||
zend_string *opened_path = NULL;
|
|
||||||
/* when in read only mode try to use existing .lck file first */
|
/* when in read only mode try to use existing .lck file first */
|
||||||
/* do not log errors for .lck file while in read only mode on .lck file */
|
/* do not log errors for .lck file while in read only mode on .lck file */
|
||||||
lock_file_mode = "rb";
|
lock_file_mode = "rb";
|
||||||
connection->info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, &opened_path);
|
connection->info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, NULL);
|
||||||
if (opened_path) {
|
|
||||||
zend_string_release_ex(opened_path, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!connection->info->lock.fp) {
|
if (!connection->info->lock.fp) {
|
||||||
/* when not in read mode or failed to open .lck file read only. now try again in create(write) mode and log errors */
|
/* when not in read mode or failed to open .lck file read only. now try again in create(write) mode and log errors */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue