From: Ruben Kerkhof Date: Tue, 13 Aug 2019 09:45:08 +0000 (+0200) Subject: treewide: fix a few missing include guards X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=393d869c7a0d27b7c5571e7f227321ec9e2150cd;p=collectd.git treewide: fix a few missing include guards found with LGTM --- diff --git a/src/daemon/utils_random.h b/src/daemon/utils_random.h index 75bdc12e..ff0022eb 100644 --- a/src/daemon/utils_random.h +++ b/src/daemon/utils_random.h @@ -24,6 +24,9 @@ * Florian Forster **/ +#ifndef UTILS_RANDOM_H +#define UTILS_RANDOM_H 1 + /** * Returns a random double value in the range [0..1), i.e. excluding 1. * @@ -46,3 +49,5 @@ uint32_t cdrand_u(void); * outside the intended range. This function is thread- and reentrant-safe. */ long cdrand_range(long min, long max); + +#endif /* !UTILS_RANDOM_H */ diff --git a/src/utils/latency/latency.h b/src/utils/latency/latency.h index 9d878dab..6c2c8aee 100644 --- a/src/utils/latency/latency.h +++ b/src/utils/latency/latency.h @@ -24,6 +24,9 @@ * Florian Forster **/ +#ifndef UTILS_LATENCY_LATENCY_H +#define UTILS_LATENCY_LATENCY_H 1 + #include "collectd.h" #include "utils_time.h" @@ -61,3 +64,5 @@ cdtime_t latency_counter_get_percentile(latency_counter_t *lc, double percent); */ double latency_counter_get_rate(const latency_counter_t *lc, cdtime_t lower, cdtime_t upper, const cdtime_t now); + +#endif /* UTILS_LATENCY_LATENCY_H */ diff --git a/src/utils/proc_pids/proc_pids.h b/src/utils/proc_pids/proc_pids.h index 8b19497c..9170398f 100644 --- a/src/utils/proc_pids/proc_pids.h +++ b/src/utils/proc_pids/proc_pids.h @@ -27,6 +27,9 @@ * Michał Aleksiński **/ +#ifndef UTILS_PROC_PIDS_PROC_PIDS_H +#define UTILS_PROC_PIDS_PROC_PIDS_H 1 + #include #include @@ -224,3 +227,5 @@ int proc_pids_update(const char *procfs_path, proc_pids_t *proc_pids[], * 0 on success. -1 on error. */ int proc_pids_free(proc_pids_t *proc_pids[], size_t proc_pids_num); + +#endif /* UTILS_PROC_PIDS_PROC_PIDS_H */ diff --git a/src/utils_tail_match.h b/src/utils_tail_match.h index 43d3fcfa..771c2410 100644 --- a/src/utils_tail_match.h +++ b/src/utils_tail_match.h @@ -33,6 +33,9 @@ * regular expressions. */ +#ifndef UTILS_TAIL_MATCH_H +#define UTILS_TAIL_MATCH_H 1 + #include "utils/latency/latency_config.h" #include "utils/match/match.h" @@ -133,3 +136,5 @@ int tail_match_add_match_simple(cu_tail_match_t *obj, const char *regex, * Zero on success, nonzero on failure. */ int tail_match_read(cu_tail_match_t *obj); + +#endif /* UTILS_TAIL_MATCH_H */