From cec9a98bc61bccd04dd0de8f286a1b094743047b Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 11 Nov 2024 14:05:45 -0500 Subject: [PATCH] Clean up ODBC header (#16754) Remove an unused field from globals, fix indentation. --- ext/odbc/php_odbc.c | 1 - ext/odbc/php_odbc_includes.h | 19 +++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 464e0f0d459..4017c72a35a 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -545,7 +545,6 @@ PHP_MINIT_FUNCTION(odbc) /* {{{ PHP_RINIT_FUNCTION */ PHP_RINIT_FUNCTION(odbc) { - ODBCG(defConn) = -1; ODBCG(num_links) = ODBCG(num_persistent); memset(ODBCG(laststate), '\0', 6); memset(ODBCG(lasterrormsg), '\0', SQL_MAX_MESSAGE_LENGTH); diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index 59404ecd266..e0c6330d744 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -187,10 +187,10 @@ #endif typedef struct odbc_connection { - ODBC_SQL_ENV_T henv; - ODBC_SQL_CONN_T hdbc; - char laststate[6]; - char lasterrormsg[SQL_MAX_MESSAGE_LENGTH]; + ODBC_SQL_ENV_T henv; + ODBC_SQL_CONN_T hdbc; + char laststate[6]; + char lasterrormsg[SQL_MAX_MESSAGE_LENGTH]; HashTable results; } odbc_connection; @@ -239,12 +239,11 @@ ZEND_BEGIN_MODULE_GLOBALS(odbc) zend_long max_links; zend_long num_persistent; zend_long num_links; - int defConn; - zend_long defaultlrl; - zend_long defaultbinmode; - zend_long default_cursortype; - char laststate[6]; - char lasterrormsg[SQL_MAX_MESSAGE_LENGTH]; + zend_long defaultlrl; + zend_long defaultbinmode; + zend_long default_cursortype; + char laststate[6]; + char lasterrormsg[SQL_MAX_MESSAGE_LENGTH]; /* Stores ODBC links throughout the duration of a request. The connection member may be either persistent or * non-persistent. In the former case, it is a pointer to an item in EG(persistent_list). This solution makes it * possible to properly free links during RSHUTDOWN (or when they are explicitly closed), while persistent