[php-src] master: Remove redundant check in mysqlnd_conn_data::connect (#13849)

From: Date: Sun, 31 Mar 2024 14:16:54 +0000
Subject: [php-src] master: Remove redundant check in mysqlnd_conn_data::connect (#13849)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127911@lists.php.net to get a copy of this message
Author: Niels Dossche (nielsdos) Committer: GitHub (web-flow) Pusher: nielsdos Date: 2024-03-31T16:16:49+02:00 Commit: https://github.com/php/php-src/commit/33c2d6b9a40c02272c18988c3c5c427de039f47f Raw diff: https://github.com/php/php-src/commit/33c2d6b9a40c02272c18988c3c5c427de039f47f.diff Remove redundant check in mysqlnd_conn_data::connect (#13849) conn is dereferenced at top so it is always non-NULL. Changed paths: M ext/mysqlnd/mysqlnd_connection.c Diff: diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index d46029889fad..efcca57e5c82 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -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.");

« previous php.cvs (#127911) next »