Module: monitoring-plugins
Branch: master
Commit: b207ac3b0ab4dd4511fb9a25edb84e150b8b3482
Author: Lorenz Kästle <[email protected]>
Date: Tue Nov 4 12:14:36 2025 +0100
URL:
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=b207ac3b
remove cpp constant and localize that value instead
---
plugins/check_pgsql.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 793a686f..66b9231e 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -71,8 +71,6 @@ void print_usage(void);
static int verbose = 0;
-#define OPTID_QUERYNAME -1000
-
/******************************************************************************
The (pseudo?)literate programming XML is contained within \@\@\- <XML> \-\@\@
@@ -244,6 +242,11 @@ int main(int argc, char **argv) {
/* process command-line arguments */
check_pgsql_config_wrapper process_arguments(int argc, char **argv) {
+
+ enum {
+ OPTID_QUERYNAME = CHAR_MAX + 1,
+ };
+
static struct option longopts[] = {{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
{"timeout", required_argument, 0, 't'},