diff --git a/include/LLM_Bridge.h b/include/LLM_Bridge.h index cfb97e072..e5b6cbf4b 100644 --- a/include/LLM_Bridge.h +++ b/include/LLM_Bridge.h @@ -334,4 +334,4 @@ public: #endif /* PROXYSQLGENAI */ -#endif // __CLASS_LLM_BRIDGE_H +#endif /* PROXYSQL_LLM_BRIDGE_H */ diff --git a/include/MySQL_LDAP_Authentication.hpp b/include/MySQL_LDAP_Authentication.hpp index 86f352fd9..732ba13da 100644 --- a/include/MySQL_LDAP_Authentication.hpp +++ b/include/MySQL_LDAP_Authentication.hpp @@ -2,11 +2,11 @@ #define CLASS_MYSQL_LDAP_AUTHENTICATION_H struct LDAP_USER_FIELD_IDX { - enum index { + enum index : uint8_t { USERNAME = 0, FRONTEND_CONNECTIONS = 1, FRONTED_MAX_CONNECTIONS = 2, - __SIZE + SIZE_ }; }; diff --git a/include/proxysql_coredump.h b/include/proxysql_coredump.h index b4118b2b8..b531ce448 100644 --- a/include/proxysql_coredump.h +++ b/include/proxysql_coredump.h @@ -24,4 +24,4 @@ void proxy_coredump_generate(); }\ } -#endif // __PROXYSQL_COREDUMP_H +#endif /* PROXYSQL_COREDUMP_H */ diff --git a/include/proxysql_restapi.h b/include/proxysql_restapi.h index 1ca79d8c8..5749a32bd 100644 --- a/include/proxysql_restapi.h +++ b/include/proxysql_restapi.h @@ -40,4 +40,4 @@ public: void save_restapi_runtime_to_database(bool); }; -#endif // #ifndef __PROXYSQL_RESTAPI_H__ +#endif /* PROXYSQL_RESTAPI_H */ diff --git a/include/proxysql_sslkeylog.h b/include/proxysql_sslkeylog.h index 6691f2a70..7d212e121 100644 --- a/include/proxysql_sslkeylog.h +++ b/include/proxysql_sslkeylog.h @@ -118,4 +118,4 @@ void proxysql_keylog_write_line_callback(const SSL* ssl, const char* line); */ void proxysql_keylog_set_pgsql_callback(); -#endif // __PROXYSQL_SSLKEYLOG_H +#endif /* PROXYSQL_SSLKEYLOG_H */ diff --git a/include/query_processor.h b/include/query_processor.h index 58beddf35..daa89ea35 100644 --- a/include/query_processor.h +++ b/include/query_processor.h @@ -184,15 +184,8 @@ class Query_Processor_Output { void operator delete(void *ptr) { l_free(sizeof(Query_Processor_Output),ptr); } - Query_Processor_Output() - : ptr(nullptr), size(0), destination_hostgroup(-1), mirror_hostgroup(-1), - mirror_flagOUT(false), next_query_flagIN(false), cache_ttl(0), - cache_empty_result(false), cache_timeout(0), reconnect(true), - timeout(0), retries(3), delay(0), error_msg(nullptr), OK_msg(nullptr), - sticky_conn(false), multiplex(true), max_lag_ms(0), log(false), - firewall_whitelist_mode(false), attributes(nullptr), comment(nullptr), - create_new_conn(false), new_query(nullptr) - { + Query_Processor_Output() { + init(); } ~Query_Processor_Output() { //destroy(); diff --git a/lib/MySQL_Authentication.cpp b/lib/MySQL_Authentication.cpp index 85ef5b475..cb571623d 100644 --- a/lib/MySQL_Authentication.cpp +++ b/lib/MySQL_Authentication.cpp @@ -23,10 +23,6 @@ void free_account_details(account_details_t& ad) { free(ad.sha1_pass); ad.sha1_pass=NULL; } - if (ad.password) { - free(ad.password); - ad.password = nullptr; - } if (ad.clear_text_password[PASSWORD_TYPE::PRIMARY]) { free(ad.clear_text_password[PASSWORD_TYPE::PRIMARY]); ad.clear_text_password[PASSWORD_TYPE::PRIMARY] = nullptr;