From: Zebity Spring Date: Sat, 9 Nov 2019 16:29:16 +0000 (+1100) Subject: Format BSD constrained sysctl usage X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f22b9ecc5e5d204e5dcb6861d6fd8039e1fb0181;p=collectd.git Format BSD constrained sysctl usage --- diff --git a/src/memory.c b/src/memory.c index 85986516..107e867f 100644 --- a/src/memory.c +++ b/src/memory.c @@ -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 #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; diff --git a/src/swap.c b/src/swap.c index ee5afa0d..0e317e76 100644 --- a/src/swap.c +++ b/src/swap.c @@ -49,7 +49,8 @@ #if HAVE_SYS_PARAM_H #include #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 #endif diff --git a/src/uuid.c b/src/uuid.c index 4bd43340..a5fba034 100644 --- a/src/uuid.c +++ b/src/uuid.c @@ -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 #endif