1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove redundant check in mysqlnd_conn_data::connect (#13849)

`conn` is dereferenced at top so it is always non-NULL.
This commit is contained in:
Niels Dossche
2024-03-31 16:16:49 +02:00
committed by GitHub
parent f6447b337e
commit 33c2d6b9a4

View File

@@ -577,7 +577,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u persistent=%u state=%u",
hostname.s?hostname.s:"", username.s?username.s:"", database.s?database.s:"", port, mysql_flags,
conn? conn->persistent:0, conn? (int)GET_CONNECTION_STATE(&conn->state):-1);
conn->persistent, (int)GET_CONNECTION_STATE(&conn->state));
if (GET_CONNECTION_STATE(&conn->state) > CONN_ALLOCED) {
DBG_INF("Connecting on a connected handle.");