]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
treewide: fix a few missing include guards 3252/head
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 13 Aug 2019 09:45:08 +0000 (11:45 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 13 Aug 2019 09:57:11 +0000 (11:57 +0200)
found with LGTM

src/daemon/utils_random.h
src/utils/latency/latency.h
src/utils/proc_pids/proc_pids.h
src/utils_tail_match.h

index 75bdc12e127f6210eae5de1c0f71b95157c61955..ff0022ebccb26dfecd796b29e40c14896ce34d1f 100644 (file)
@@ -24,6 +24,9 @@
  *   Florian Forster <octo at collectd.org>
  **/
 
+#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 */
index 9d878dabcda3ff0d7287f8a3dc332c73b2e3171e..6c2c8aeebd36964ce8830a53c8193d7cf30dbd06 100644 (file)
@@ -24,6 +24,9 @@
  *   Florian Forster <ff at octo.it>
  **/
 
+#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 */
index 8b19497c21c0724ea35c8ae5dce8ed22c0439b11..9170398fb8cebfc90a8852550ac646cc28217f19 100644 (file)
@@ -27,6 +27,9 @@
  *   Michał Aleksiński <michalx.aleksinski@intel.com>
  **/
 
+#ifndef UTILS_PROC_PIDS_PROC_PIDS_H
+#define UTILS_PROC_PIDS_PROC_PIDS_H 1
+
 #include <dirent.h>
 #include <sys/types.h>
 
@@ -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 */
index 43d3fcfac2cb023f4387b0e54dea83538172ead9..771c2410960d60b2bb37b2c6cca92af9cc1cfe36 100644 (file)
@@ -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 */