summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2026-06-10 14:49:33 +0200
committerGitHub <noreply@github.com>2026-06-10 14:49:33 +0200
commitf8aad020f7c0be604da8981663b6d815f94ffaa4 (patch)
treee1c7bdeff275778b4dd324d26e826c861d143b48 /lib
parent47b1b2d754d4809006f6dc1aa13ba9c80405975c (diff)
downloadmonitoring-plugins-f8aad020f7c0be604da8981663b6d815f94ffaa4.tar.gz
Run clang-format on everything once again (#2275)
Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/output.h2
-rw-r--r--lib/parse_ini.c3
-rw-r--r--lib/perfdata.c6
-rw-r--r--lib/utils_cmd.h10
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/output.h b/lib/output.h
index b9cdb07d..37486925 100644
--- a/lib/output.h
+++ b/lib/output.h
@@ -65,7 +65,7 @@ mp_output_detail_level mp_get_level_of_detail(void);
65 */ 65 */
66typedef struct mp_check mp_check; 66typedef struct mp_check mp_check;
67struct mp_check { 67struct mp_check {
68 char *summary; // Overall summary, if not set a summary will be automatically generated 68 char *summary; // Overall summary, if not set a summary will be automatically generated
69 char *ok_summary; // (optional) Summary if the overall state is OK 69 char *ok_summary; // (optional) Summary if the overall state is OK
70 mp_subcheck_list *subchecks; 70 mp_subcheck_list *subchecks;
71 71
diff --git a/lib/parse_ini.c b/lib/parse_ini.c
index 8a54af58..98207051 100644
--- a/lib/parse_ini.c
+++ b/lib/parse_ini.c
@@ -130,7 +130,8 @@ np_arg_list *np_get_defaults(const char *locator, const char *default_section) {
130 130
131 np_arg_list *defaults = NULL; 131 np_arg_list *defaults = NULL;
132 if (!read_defaults(inifile, ini_info.stanza, &defaults)) { 132 if (!read_defaults(inifile, ini_info.stanza, &defaults)) {
133 die(STATE_UNKNOWN, _("Invalid section '%s' in config file '%s'\n"), ini_info.stanza, ini_info.file); 133 die(STATE_UNKNOWN, _("Invalid section '%s' in config file '%s'\n"), ini_info.stanza,
134 ini_info.file);
134 } 135 }
135 136
136 if (ini_info.file_string_on_heap) { 137 if (ini_info.file_string_on_heap) {
diff --git a/lib/perfdata.c b/lib/perfdata.c
index e3710ec7..f57f7c06 100644
--- a/lib/perfdata.c
+++ b/lib/perfdata.c
@@ -253,9 +253,9 @@ char *mp_range_to_string(const mp_range input) {
253 } else { 253 } else {
254 // check for zeroes, so we can use the short form 254 // check for zeroes, so we can use the short form
255 if ((input.start.type == PD_TYPE_NONE) || 255 if ((input.start.type == PD_TYPE_NONE) ||
256 ((input.start.type == PD_TYPE_INT) && (input.start.pd_int == 0)) || 256 ((input.start.type == PD_TYPE_INT) && (input.start.pd_int == 0)) ||
257 ((input.start.type == PD_TYPE_UINT) && (input.start.pd_uint == 0)) || 257 ((input.start.type == PD_TYPE_UINT) && (input.start.pd_uint == 0)) ||
258 ((input.start.type == PD_TYPE_DOUBLE) && (input.start.pd_double == 0))){ 258 ((input.start.type == PD_TYPE_DOUBLE) && (input.start.pd_double == 0))) {
259 // nothing to do here 259 // nothing to do here
260 } else { 260 } else {
261 // Start value is an actual value 261 // Start value is an actual value
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h
index 04a624b8..e4869ce8 100644
--- a/lib/utils_cmd.h
+++ b/lib/utils_cmd.h
@@ -22,13 +22,13 @@ int cmd_run_array(char *const *, output *, output *, int);
22int cmd_file_read(const char *, output *, int); 22int cmd_file_read(const char *, output *, int);
23 23
24typedef struct { 24typedef struct {
25 int error_code; 25 int error_code;
26 int cmd_error_code; 26 int cmd_error_code;
27 output out; 27 output out;
28 output err; 28 output err;
29} cmd_run_result; 29} cmd_run_result;
30cmd_run_result cmd_run2(const char *cmd, int flags); 30cmd_run_result cmd_run2(const char *cmd, int flags);
31cmd_run_result cmd_run_array2(char * const *cmd, int flags); 31cmd_run_result cmd_run_array2(char *const *cmd, int flags);
32 32
33/* only multi-threaded plugins need to bother with this */ 33/* only multi-threaded plugins need to bother with this */
34void cmd_init(void); 34void cmd_init(void);