Skip to content

Commit 33c2d6b

Browse files
authored
Remove redundant check in mysqlnd_conn_data::connect (#13849)
`conn` is dereferenced at top so it is always non-NULL.
1 parent f6447b3 commit 33c2d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysqlnd/mysqlnd_connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
577577

578578
DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u persistent=%u state=%u",
579579
hostname.s?hostname.s:"", username.s?username.s:"", database.s?database.s:"", port, mysql_flags,
580-
conn? conn->persistent:0, conn? (int)GET_CONNECTION_STATE(&conn->state):-1);
580+
conn->persistent, (int)GET_CONNECTION_STATE(&conn->state));
581581

582582
if (GET_CONNECTION_STATE(&conn->state) > CONN_ALLOCED) {
583583
DBG_INF("Connecting on a connected handle.");

0 commit comments

Comments
 (0)