]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Format BSD constrained sysctl usage 3342/head
authorZebity Spring <zebity@yahoo.com>
Sat, 9 Nov 2019 16:29:16 +0000 (03:29 +1100)
committerZebity Spring <zebity@yahoo.com>
Sat, 9 Nov 2019 16:29:16 +0000 (03:29 +1100)
src/memory.c
src/swap.c
src/uuid.c

index 859865162c6e1d556ea80fa7fc6ec5463f33591f..107e867f9c92e8524e4332f961ba05b3dcbad652 100644 (file)
@@ -28,7 +28,8 @@
 #include "plugin.h"
 #include "utils/common/common.h"
 
-#if (defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)) || defined(__OpenBSD__)
+#if (defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)) ||              \
+    defined(__OpenBSD__)
 /* Implies BSD variant */
 #include <sys/sysctl.h>
 #endif
@@ -82,7 +83,7 @@ static kstat_t *ksz;
 /* #endif HAVE_LIBKSTAT */
 
 #elif HAVE_SYSCTL && __OpenBSD__
-/* OpenBSD variant does not have sysctlbyname */ 
+/* OpenBSD variant does not have sysctlbyname */
 static int pagesize;
 /* #endif HAVE_SYSCTL && __OpenBSD__ */
 
@@ -145,7 +146,7 @@ static int memory_init(void) {
     /* #endif HAVE_LIBKSTAT */
 
 #elif HAVE_SYSCTL && __OpenBSD__
-/* OpenBSD variant does not have sysctlbyname */ 
+  /* OpenBSD variant does not have sysctlbyname */
   pagesize = getpagesize();
   if (pagesize <= 0) {
     ERROR("memory plugin: Invalid pagesize: %i", pagesize);
@@ -412,7 +413,7 @@ static int memory_read_internal(value_list_t *vl) {
   /* #endif HAVE_LIBKSTAT */
 
 #elif HAVE_SYSCTL && __OpenBSD__
-/* OpenBSD variant does not have HAVE_SYSCTLBYNAME */ 
+  /* OpenBSD variant does not have HAVE_SYSCTLBYNAME */
   int mib[] = {CTL_VM, VM_METER};
   struct vmtotal vmtotal = {0};
   gauge_t mem_active;
index ee5afa0d7dd7adad99aaec3081eb9212283dcbe8..0e317e76cf819bc51201527fcbc34b01d508966b 100644 (file)
@@ -49,7 +49,8 @@
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#if (defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)) || defined(__OpenBSD__)
+#if (defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)) ||              \
+    defined(__OpenBSD__)
 /* implies BSD variant */
 #include <sys/sysctl.h>
 #endif
index 4bd43340f61a0100b10233bd61bf5d889706a2bd..a5fba034faf22f518f496deb5125a10bb8a24f8b 100644 (file)
@@ -29,7 +29,8 @@
 #include "plugin.h"
 #include "utils/common/common.h"
 
-#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME) || defined(__OpenBSD__)
+#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME) ||                \
+    defined(__OpenBSD__)
 /* Implies have BSD variant */
 #include <sys/sysctl.h>
 #endif