summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDirk Mueller <dmueller@suse.com>2026-02-16 11:21:21 +0100
committerGitHub <noreply@github.com>2026-02-16 11:21:21 +0100
commit423d0c52674bfa4ec49e4ae8bce645131f657f74 (patch)
treea27276c89d37e3753b5ead6abe56132f2801d444 /lib
parent0f0865c910096c95594ac09929708e84934e46df (diff)
downloadmonitoring-plugins-423d0c52674bfa4ec49e4ae8bce645131f657f74.tar.gz
Fix a few typos (#2231)
Diffstat (limited to 'lib')
-rw-r--r--lib/extra_opts.c2
-rw-r--r--lib/extra_opts.h2
-rw-r--r--lib/output.c4
-rw-r--r--lib/parse_ini.c2
-rw-r--r--lib/perfdata.c2
-rw-r--r--lib/states.h2
6 files changed, 7 insertions, 7 deletions
diff --git a/lib/extra_opts.c b/lib/extra_opts.c
index 3fe69014..fa64d650 100644
--- a/lib/extra_opts.c
+++ b/lib/extra_opts.c
@@ -120,7 +120,7 @@ char **np_extra_opts(int *argc, char **argv, const char *plugin_name) {
120 } 120 }
121 ea1 = ea_tmp = NULL; 121 ea1 = ea_tmp = NULL;
122 } 122 }
123 } /* lather, rince, repeat */ 123 } /* lather, rinse, repeat */
124 124
125 if (ea_num == (size_t)*argc && extra_args == NULL) { 125 if (ea_num == (size_t)*argc && extra_args == NULL) {
126 /* No extra-opts */ 126 /* No extra-opts */
diff --git a/lib/extra_opts.h b/lib/extra_opts.h
index 3f64360f..3c2d5eb1 100644
--- a/lib/extra_opts.h
+++ b/lib/extra_opts.h
@@ -8,7 +8,7 @@
8 8
9/* np_extra_opts: Process the --extra-opts arguments and create a new argument 9/* np_extra_opts: Process the --extra-opts arguments and create a new argument
10 * array with ini-processed and argument-passed arguments together. The 10 * array with ini-processed and argument-passed arguments together. The
11 * ini-procesed arguments always come first (in the order of --extra-opts 11 * ini-processed arguments always come first (in the order of --extra-opts
12 * arguments). If no --extra-opts arguments are provided or returned nothing 12 * arguments). If no --extra-opts arguments are provided or returned nothing
13 * it returns **argv otherwise the new array is returned. --extra-opts are 13 * it returns **argv otherwise the new array is returned. --extra-opts are
14 * always removed from **argv. The original pointers from **argv are kept in 14 * always removed from **argv. The original pointers from **argv are kept in
diff --git a/lib/output.c b/lib/output.c
index d650a3c5..d1a8d3b9 100644
--- a/lib/output.c
+++ b/lib/output.c
@@ -165,7 +165,7 @@ int mp_add_subcheck_to_subcheck(mp_subcheck check[static 1], mp_subcheck subchec
165void mp_add_summary(mp_check check[static 1], char *summary) { check->summary = summary; } 165void mp_add_summary(mp_check check[static 1], char *summary) { check->summary = summary; }
166 166
167/* 167/*
168 * Generate the summary string of a mp_check object based on it's subchecks 168 * Generate the summary string of a mp_check object based on its subchecks
169 */ 169 */
170char *get_subcheck_summary(mp_check check) { 170char *get_subcheck_summary(mp_check check) {
171 mp_subcheck_list *subchecks = check.subchecks; 171 mp_subcheck_list *subchecks = check.subchecks;
@@ -243,7 +243,7 @@ mp_state_enum mp_compute_check_state(const mp_check check) {
243} 243}
244 244
245/* 245/*
246 * Generate the result state of a mp_check object based on it's own state and it's subchecks states 246 * Generate the result state of a mp_check object based on its own state and its subchecks states
247 */ 247 */
248mp_state_enum mp_eval_check_default(const mp_check check) { 248mp_state_enum mp_eval_check_default(const mp_check check) {
249 assert(check.subchecks != NULL); // a mp_check without subchecks is invalid, die here 249 assert(check.subchecks != NULL); // a mp_check without subchecks is invalid, die here
diff --git a/lib/parse_ini.c b/lib/parse_ini.c
index 196cac79..8a54af58 100644
--- a/lib/parse_ini.c
+++ b/lib/parse_ini.c
@@ -173,7 +173,7 @@ static bool read_defaults(FILE *defaults_file, const char *stanza, np_arg_list *
173 continue; 173 continue;
174 } 174 }
175 switch (current_char) { 175 switch (current_char) {
176 /* globble up comment lines */ 176 /* gobble up comment lines */
177 case ';': 177 case ';':
178 case '#': 178 case '#':
179 GOBBLE_TO(defaults_file, current_char, '\n'); 179 GOBBLE_TO(defaults_file, current_char, '\n');
diff --git a/lib/perfdata.c b/lib/perfdata.c
index 2930a8bc..b447b8ea 100644
--- a/lib/perfdata.c
+++ b/lib/perfdata.c
@@ -37,7 +37,7 @@ char *pd_to_string(mp_perfdata pd) {
37 if (strchr(pd.label, '\'') == NULL) { 37 if (strchr(pd.label, '\'') == NULL) {
38 asprintf(&result, "'%s'=", pd.label); 38 asprintf(&result, "'%s'=", pd.label);
39 } else { 39 } else {
40 // we have a illegal single quote in the string 40 // we have an illegal single quote in the string
41 // replace it silently instead of complaining 41 // replace it silently instead of complaining
42 for (char *ptr = pd.label; *ptr == '\0'; ptr++) { 42 for (char *ptr = pd.label; *ptr == '\0'; ptr++) {
43 if (*ptr == '\'') { 43 if (*ptr == '\'') {
diff --git a/lib/states.h b/lib/states.h
index 4a170caa..43926f0c 100644
--- a/lib/states.h
+++ b/lib/states.h
@@ -45,7 +45,7 @@ static inline mp_state_enum max_state(mp_state_enum a, mp_state_enum b) {
45 * STATE_OK < STATE_DEPENDENT < STATE_UNKNOWN < STATE_WARNING < STATE_CRITICAL 45 * STATE_OK < STATE_DEPENDENT < STATE_UNKNOWN < STATE_WARNING < STATE_CRITICAL
46 * 46 *
47 * The main difference between max_state_alt and max_state it that it doesn't 47 * The main difference between max_state_alt and max_state it that it doesn't
48 * allow setting a default to UNKNOWN. It will instead prioritixe any valid 48 * allow setting a default to UNKNOWN. It will instead prioritize any valid
49 * non-OK state. 49 * non-OK state.
50 ****************************************************************************/ 50 ****************************************************************************/
51 51