Module: monitoring-plugins
 Branch: master
 Commit: b6150cded11526ffde40d9fa14f37a76e712c447
 Author: Lorenz Kästle <[email protected]>
   Date: Thu Nov  6 10:08:02 2025 +0100
    URL: 
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=b6150cde

check_mysql: replace cpp constant with a proper enum

---

 plugins/check_mysql.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 6134d6c6..7f2da5ac 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -401,10 +401,13 @@ int main(int argc, char **argv) {
        return STATE_OK;
 }
 
-#define CHECK_REPLICA_OPT CHAR_MAX + 1
-
 /* process command-line arguments */
 check_mysql_config_wrapper process_arguments(int argc, char **argv) {
+
+       enum {
+               CHECK_REPLICA_OPT = CHAR_MAX + 1,
+       };
+
        static struct option longopts[] = {{"hostname", required_argument, 0, 
'H'},
                                                                           
{"socket", required_argument, 0, 's'},
                                                                           
{"database", required_argument, 0, 'd'},

Reply via email to