projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61a4ed9
)
No need to initialize static bools to false
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sun, 13 May 2018 16:56:18 +0000
(18:56 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sun, 13 May 2018 16:56:18 +0000
(18:56 +0200)
35 files changed:
src/apcups.c
patch
|
blob
|
history
src/barometer.c
patch
|
blob
|
history
src/battery.c
patch
|
blob
|
history
src/collectd-nagios.c
patch
|
blob
|
history
src/cpu.c
patch
|
blob
|
history
src/daemon/plugin.c
patch
|
blob
|
history
src/daemon/utils_random.c
patch
|
blob
|
history
src/df.c
patch
|
blob
|
history
src/disk.c
patch
|
blob
|
history
src/ethstat.c
patch
|
blob
|
history
src/fhcount.c
patch
|
blob
|
history
src/hugepages.c
patch
|
blob
|
history
src/interface.c
patch
|
blob
|
history
src/libcollectdclient/network_buffer.c
patch
|
blob
|
history
src/load.c
patch
|
blob
|
history
src/lpar.c
patch
|
blob
|
history
src/memcached.c
patch
|
blob
|
history
src/memory.c
patch
|
blob
|
history
src/network.c
patch
|
blob
|
history
src/ntpd.c
patch
|
blob
|
history
src/onewire.c
patch
|
blob
|
history
src/openvpn.c
patch
|
blob
|
history
src/pinba.c
patch
|
blob
|
history
src/postgresql.c
patch
|
blob
|
history
src/processes.c
patch
|
blob
|
history
src/python.c
patch
|
blob
|
history
src/sensors.c
patch
|
blob
|
history
src/statsd.c
patch
|
blob
|
history
src/swap.c
patch
|
blob
|
history
src/tail_csv.c
patch
|
blob
|
history
src/thermal.c
patch
|
blob
|
history
src/turbostat.c
patch
|
blob
|
history
src/unixsock.c
patch
|
blob
|
history
src/utils_vl_lookup_test.c
patch
|
blob
|
history
src/varnish.c
patch
|
blob
|
history
diff --git
a/src/apcups.c
b/src/apcups.c
index
2fa2479
..
f16da90
100644
(file)
--- a/
src/apcups.c
+++ b/
src/apcups.c
@@
-73,7
+73,7
@@
typedef struct {
static char *conf_node = NULL;
static char *conf_service = NULL;
/* Defaults to false for backwards compatibility. */
static char *conf_node = NULL;
static char *conf_service = NULL;
/* Defaults to false for backwards compatibility. */
-static bool conf_report_seconds
= 0
;
+static bool conf_report_seconds;
static bool conf_persistent_conn = 1;
static int global_sockfd = -1;
static bool conf_persistent_conn = 1;
static int global_sockfd = -1;
diff --git
a/src/barometer.c
b/src/barometer.c
index
be8198a
..
f21cdaf
100644
(file)
--- a/
src/barometer.c
+++ b/
src/barometer.c
@@
-186,7
+186,7
@@
static double config_temp_offset = 0.0; /**< temperature offset */
static double config_altitude = NAN; /**< altitude */
static int config_normalize = 0; /**< normalization method */
static double config_altitude = NAN; /**< altitude */
static int config_normalize = 0; /**< normalization method */
-static bool configured
= 0
; /**< the whole plugin config status */
+static bool configured; /**< the whole plugin config status */
static int i2c_bus_fd = -1; /**< I2C bus device FD */
static int i2c_bus_fd = -1; /**< I2C bus device FD */
@@
-226,7
+226,7
@@
static short bmp085_MD;
/* Used only for MPL115. MPL3115 supports real oversampling in the device so */
/* no need for any postprocessing. */
/* Used only for MPL115. MPL3115 supports real oversampling in the device so */
/* no need for any postprocessing. */
-static bool avg_initialized
= 0
; /**< already initialized by real values */
+static bool avg_initialized; /**< already initialized by real values */
typedef struct averaging_s {
long int *ring_buffer;
typedef struct averaging_s {
long int *ring_buffer;
diff --git
a/src/battery.c
b/src/battery.c
index
74e2796
..
0e2667c
100644
(file)
--- a/
src/battery.c
+++ b/
src/battery.c
@@
-72,9
+72,9
@@
int battery_read_statefs(
void); /* defined in battery_statefs; used by StateFS backend */
int battery_read_statefs(
void); /* defined in battery_statefs; used by StateFS backend */
-static bool report_percent
= 0
;
-static bool report_degraded
= 0
;
-static bool query_statefs
= 0
;
+static bool report_percent;
+static bool report_degraded;
+static bool query_statefs;
static void battery_submit2(char const *plugin_instance, /* {{{ */
char const *type, char const *type_instance,
static void battery_submit2(char const *plugin_instance, /* {{{ */
char const *type, char const *type_instance,
diff --git
a/src/collectd-nagios.c
b/src/collectd-nagios.c
index
27d5622
..
d53ae65
100644
(file)
--- a/
src/collectd-nagios.c
+++ b/
src/collectd-nagios.c
@@
-101,7
+101,7
@@
static char *hostname_g = NULL;
static range_t range_critical_g;
static range_t range_warning_g;
static int consolitation_g = CON_NONE;
static range_t range_critical_g;
static range_t range_warning_g;
static int consolitation_g = CON_NONE;
-static bool nan_is_error_g
= 0
;
+static bool nan_is_error_g;
static char **match_ds_g = NULL;
static size_t match_ds_num_g = 0;
static char **match_ds_g = NULL;
static size_t match_ds_num_g = 0;
diff --git
a/src/cpu.c
b/src/cpu.c
index
42fcbed
..
a0e00d7
100644
(file)
--- a/
src/cpu.c
+++ b/
src/cpu.c
@@
-196,9
+196,9
@@
static size_t global_cpu_num = 0;
static bool report_by_cpu = 1;
static bool report_by_state = 1;
static bool report_by_cpu = 1;
static bool report_by_state = 1;
-static bool report_percent
= 0
;
-static bool report_num_cpu
= 0
;
-static bool report_guest
= 0
;
+static bool report_percent;
+static bool report_num_cpu;
+static bool report_guest;
static bool subtract_guest = 1;
static const char *config_keys[] = {"ReportByCpu", "ReportByState",
static bool subtract_guest = 1;
static const char *config_keys[] = {"ReportByCpu", "ReportByState",
diff --git
a/src/daemon/plugin.c
b/src/daemon/plugin.c
index
eb26958
..
3dcd9fc
100644
(file)
--- a/
src/daemon/plugin.c
+++ b/
src/daemon/plugin.c
@@
-133,13
+133,13
@@
static pthread_t *write_threads = NULL;
static size_t write_threads_num = 0;
static pthread_key_t plugin_ctx_key;
static size_t write_threads_num = 0;
static pthread_key_t plugin_ctx_key;
-static bool plugin_ctx_key_initialized
= 0
;
+static bool plugin_ctx_key_initialized;
static long write_limit_high = 0;
static long write_limit_low = 0;
static derive_t stats_values_dropped = 0;
static long write_limit_high = 0;
static long write_limit_low = 0;
static derive_t stats_values_dropped = 0;
-static bool record_statistics
= 0
;
+static bool record_statistics;
/*
* Static functions
/*
* Static functions
diff --git
a/src/daemon/utils_random.c
b/src/daemon/utils_random.c
index
def0ba6
..
e3ce34c
100644
(file)
--- a/
src/daemon/utils_random.c
+++ b/
src/daemon/utils_random.c
@@
-32,7
+32,7
@@
#include <pthread.h>
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
#include <pthread.h>
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-static bool have_seed
= 0
;
+static bool have_seed;
static unsigned short seed[3];
static void cdrand_seed(void) {
static unsigned short seed[3];
static void cdrand_seed(void) {
diff --git
a/src/df.c
b/src/df.c
index
5c08ca4
..
7e4c715
100644
(file)
--- a/
src/df.c
+++ b/
src/df.c
@@
-55,10
+55,10
@@
static ignorelist_t *il_device = NULL;
static ignorelist_t *il_mountpoint = NULL;
static ignorelist_t *il_fstype = NULL;
static ignorelist_t *il_mountpoint = NULL;
static ignorelist_t *il_fstype = NULL;
-static bool by_device
= 0
;
-static bool report_inodes
= 0
;
+static bool by_device;
+static bool report_inodes;
static bool values_absolute = 1;
static bool values_absolute = 1;
-static bool values_percentage
= 0
;
+static bool values_percentage;
static int df_init(void) {
if (il_device == NULL)
static int df_init(void) {
if (il_device == NULL)
diff --git
a/src/disk.c
b/src/disk.c
index
317e105
..
506c0e0
100644
(file)
--- a/
src/disk.c
+++ b/
src/disk.c
@@
-82,7
+82,7
@@
static mach_port_t io_master_port = MACH_PORT_NULL;
/* This defaults to false for backwards compatibility. Please fix in the next
* major version. */
static mach_port_t io_master_port = MACH_PORT_NULL;
/* This defaults to false for backwards compatibility. Please fix in the next
* major version. */
-static bool use_bsd_name
= 0
;
+static bool use_bsd_name;
/* #endif HAVE_IOKIT_IOKITLIB_H */
#elif KERNEL_LINUX
/* #endif HAVE_IOKIT_IOKITLIB_H */
#elif KERNEL_LINUX
diff --git
a/src/ethstat.c
b/src/ethstat.c
index
c234d7e
..
316c25f
100644
(file)
--- a/
src/ethstat.c
+++ b/
src/ethstat.c
@@
-53,7
+53,7
@@
static size_t interfaces_num = 0;
static c_avl_tree_t *value_map = NULL;
static c_avl_tree_t *value_map = NULL;
-static bool collect_mapped_only
= 0
;
+static bool collect_mapped_only;
static int ethstat_add_interface(const oconfig_item_t *ci) /* {{{ */
{
static int ethstat_add_interface(const oconfig_item_t *ci) /* {{{ */
{
diff --git
a/src/fhcount.c
b/src/fhcount.c
index
1e84efa
..
9e74dab
100644
(file)
--- a/
src/fhcount.c
+++ b/
src/fhcount.c
@@
-26,7
+26,7
@@
static const char *config_keys[] = {"ValuesAbsolute", "ValuesPercentage"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static bool values_absolute = 1;
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static bool values_absolute = 1;
-static bool values_percentage
= 0
;
+static bool values_percentage;
static int fhcount_config(const char *key, const char *value) {
int ret = -1;
static int fhcount_config(const char *key, const char *value) {
int ret = -1;
diff --git
a/src/hugepages.c
b/src/hugepages.c
index
9515046
..
23db25b
100644
(file)
--- a/
src/hugepages.c
+++ b/
src/hugepages.c
@@
-39,8
+39,8
@@
static bool g_flag_rpt_numa = 1;
static bool g_flag_rpt_mm = 1;
static bool g_values_pages = 1;
static bool g_flag_rpt_mm = 1;
static bool g_values_pages = 1;
-static bool g_values_bytes
= 0
;
-static bool g_values_percent
= 0
;
+static bool g_values_bytes;
+static bool g_values_percent;
#define HP_HAVE_NR 0x01
#define HP_HAVE_SURPLUS 0x02
#define HP_HAVE_NR 0x01
#define HP_HAVE_SURPLUS 0x02
diff --git
a/src/interface.c
b/src/interface.c
index
64764d5
..
e0e08c3
100644
(file)
--- a/
src/interface.c
+++ b/
src/interface.c
@@
-98,7
+98,7
@@
static bool report_inactive = 1;
extern kstat_ctl_t *kc;
static kstat_t *ksp[MAX_NUMIF];
static int numif = 0;
extern kstat_ctl_t *kc;
static kstat_t *ksp[MAX_NUMIF];
static int numif = 0;
-static bool unique_name
= 0
;
+static bool unique_name;
#endif /* HAVE_LIBKSTAT */
static int interface_config(const char *key, const char *value) {
#endif /* HAVE_LIBKSTAT */
static int interface_config(const char *key, const char *value) {
diff --git
a/src/libcollectdclient/network_buffer.c
b/src/libcollectdclient/network_buffer.c
index
755d476
..
07d3e76
100644
(file)
--- a/
src/libcollectdclient/network_buffer.c
+++ b/
src/libcollectdclient/network_buffer.c
@@
-125,7
+125,7
@@
struct lcc_network_buffer_s {
*/
static bool have_gcrypt(void) /* {{{ */
{
*/
static bool have_gcrypt(void) /* {{{ */
{
- static bool result
= 0
;
+ static bool result;
static bool need_init = 1;
if (!need_init)
static bool need_init = 1;
if (!need_init)
diff --git
a/src/load.c
b/src/load.c
index
ac07fa6
..
4bc93d5
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-55,7
+55,7
@@
#include <sys/protosw.h>
#endif /* HAVE_PERFSTAT */
#include <sys/protosw.h>
#endif /* HAVE_PERFSTAT */
-static bool report_relative_load
= 0
;
+static bool report_relative_load;
static const char *config_keys[] = {"ReportRelative"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static const char *config_keys[] = {"ReportRelative"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
diff --git
a/src/lpar.c
b/src/lpar.c
index
367ebcd
..
77e6d08
100644
(file)
--- a/
src/lpar.c
+++ b/
src/lpar.c
@@
-40,10
+40,10
@@
static const char *config_keys[] = {"CpuPoolStats", "ReportBySerial"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static const char *config_keys[] = {"CpuPoolStats", "ReportBySerial"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static bool pool_stats
= 0
;
-static bool report_by_serial
= 0
;
+static bool pool_stats;
+static bool report_by_serial;
#if PERFSTAT_SUPPORTS_DONATION
#if PERFSTAT_SUPPORTS_DONATION
-static bool donate_flag
= 0
;
+static bool donate_flag;
#endif
static char serial[SYS_NMLN];
#endif
static char serial[SYS_NMLN];
diff --git
a/src/memcached.c
b/src/memcached.c
index
95a9eda
..
4579614
100644
(file)
--- a/
src/memcached.c
+++ b/
src/memcached.c
@@
-69,7
+69,7
@@
struct memcached_s {
};
typedef struct memcached_s memcached_t;
};
typedef struct memcached_s memcached_t;
-static bool memcached_have_instances
= 0
;
+static bool memcached_have_instances;
static void memcached_free(void *arg) {
memcached_t *st = arg;
static void memcached_free(void *arg) {
memcached_t *st = arg;
diff --git
a/src/memory.c
b/src/memory.c
index
336a630
..
ce9ef83
100644
(file)
--- a/
src/memory.c
+++ b/
src/memory.c
@@
-95,7
+95,7
@@
static int pagesize;
#endif
static bool values_absolute = 1;
#endif
static bool values_absolute = 1;
-static bool values_percentage
= 0
;
+static bool values_percentage;
static int memory_config(oconfig_item_t *ci) /* {{{ */
{
static int memory_config(oconfig_item_t *ci) /* {{{ */
{
diff --git
a/src/network.c
b/src/network.c
index
3b5a0f2
..
270bed2
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-264,8
+264,8
@@
typedef struct receive_list_entry_s receive_list_entry_t;
static int network_config_ttl = 0;
/* Ethernet - (IPv6 + UDP) = 1500 - (40 + 8) = 1452 */
static size_t network_config_packet_size = 1452;
static int network_config_ttl = 0;
/* Ethernet - (IPv6 + UDP) = 1500 - (40 + 8) = 1452 */
static size_t network_config_packet_size = 1452;
-static bool network_config_forward
= 0
;
-static bool network_config_stats
= 0
;
+static bool network_config_forward;
+static bool network_config_stats;
static sockent_t *sending_sockets = NULL;
static sockent_t *sending_sockets = NULL;
@@
-3096,7
+3096,7
@@
static int network_stats_read(void) /* {{{ */
} /* }}} int network_stats_read */
static int network_init(void) {
} /* }}} int network_stats_read */
static int network_init(void) {
- static bool have_init
= 0
;
+ static bool have_init;
/* Check if we were already initialized. If so, just return - there's
* nothing more to do (for now, that is). */
/* Check if we were already initialized. If so, just return - there's
* nothing more to do (for now, that is). */
diff --git
a/src/ntpd.c
b/src/ntpd.c
index
ffb71b0
..
d0cd94c
100644
(file)
--- a/
src/ntpd.c
+++ b/
src/ntpd.c
@@
-61,7
+61,7
@@
static bool do_reverse_lookups = 1;
/* This option only exists for backward compatibility. If it is false and two
* ntpd peers use the same refclock driver, the plugin will try to write
* simultaneous measurements from both to the same type instance. */
/* This option only exists for backward compatibility. If it is false and two
* ntpd peers use the same refclock driver, the plugin will try to write
* simultaneous measurements from both to the same type instance. */
-static bool include_unit_id
= 0
;
+static bool include_unit_id;
#define NTPD_DEFAULT_HOST "localhost"
#define NTPD_DEFAULT_PORT "123"
#define NTPD_DEFAULT_HOST "localhost"
#define NTPD_DEFAULT_PORT "123"
diff --git
a/src/onewire.c
b/src/onewire.c
index
65c071b
..
1803d26
100644
(file)
--- a/
src/onewire.c
+++ b/
src/onewire.c
@@
-88,7
+88,7
@@
static int ow_family_features_num = STATIC_ARRAY_SIZE(ow_family_features);
static char *device_g = NULL;
static cdtime_t ow_interval = 0;
static char *device_g = NULL;
static cdtime_t ow_interval = 0;
-static bool direct_access
= 0
;
+static bool direct_access;
static const char *config_keys[] = {"Device", "IgnoreSelected", "Sensor",
"Interval"};
static const char *config_keys[] = {"Device", "IgnoreSelected", "Sensor",
"Interval"};
@@
-96,7
+96,7
@@
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static ignorelist_t *sensor_list;
static ignorelist_t *sensor_list;
-static bool regex_direct_initialized
= 0
;
+static bool regex_direct_initialized;
static regex_t regex_direct;
/**
static regex_t regex_direct;
/**
diff --git
a/src/openvpn.c
b/src/openvpn.c
index
4c3e464
..
30254f0
100644
(file)
--- a/
src/openvpn.c
+++ b/
src/openvpn.c
@@
-80,9
+80,9
@@
struct vpn_status_s {
};
typedef struct vpn_status_s vpn_status_t;
};
typedef struct vpn_status_s vpn_status_t;
-static bool new_naming_schema
= 0
;
+static bool new_naming_schema;
static bool collect_compression = 1;
static bool collect_compression = 1;
-static bool collect_user_count
= 0
;
+static bool collect_user_count;
static bool collect_individual_users = 1;
static const char *config_keys[] = {
static bool collect_individual_users = 1;
static const char *config_keys[] = {
diff --git
a/src/pinba.c
b/src/pinba.c
index
02bdcc2
..
9620f1b
100644
(file)
--- a/
src/pinba.c
+++ b/
src/pinba.c
@@
-106,8
+106,8
@@
static pthread_mutex_t stat_nodes_lock;
static char *conf_node = NULL;
static char *conf_service = NULL;
static char *conf_node = NULL;
static char *conf_service = NULL;
-static bool collector_thread_running
= 0
;
-static bool collector_thread_do_shutdown
= 0
;
+static bool collector_thread_running;
+static bool collector_thread_do_shutdown;
static pthread_t collector_thread_id;
/* }}} */
static pthread_t collector_thread_id;
/* }}} */
diff --git
a/src/postgresql.c
b/src/postgresql.c
index
7316c54
..
803b63b
100644
(file)
--- a/
src/postgresql.c
+++ b/
src/postgresql.c
@@
-1124,7
+1124,7
@@
static int c_psql_config_database(oconfig_item_t *ci) {
c_psql_database_t *db;
char cb_name[DATA_MAX_NAME_LEN];
c_psql_database_t *db;
char cb_name[DATA_MAX_NAME_LEN];
- static bool have_flush
= 0
;
+ static bool have_flush;
if ((1 != ci->values_num) || (OCONFIG_TYPE_STRING != ci->values[0].type)) {
log_err("<Database> expects a single string argument.");
if ((1 != ci->values_num) || (OCONFIG_TYPE_STRING != ci->values[0].type)) {
log_err("<Database> expects a single string argument.");
diff --git
a/src/processes.c
b/src/processes.c
index
8e11175
..
12a63df
100644
(file)
--- a/
src/processes.c
+++ b/
src/processes.c
@@
-296,10
+296,10
@@
typedef struct procstat {
static procstat_t *list_head_g = NULL;
static bool want_init = 1;
static procstat_t *list_head_g = NULL;
static bool want_init = 1;
-static bool report_ctx_switch
= 0
;
-static bool report_fd_num
= 0
;
-static bool report_maps_num
= 0
;
-static bool report_delay
= 0
;
+static bool report_ctx_switch;
+static bool report_fd_num;
+static bool report_maps_num;
+static bool report_delay;
#if HAVE_THREAD_INFO
static mach_port_t port_host_self;
#if HAVE_THREAD_INFO
static mach_port_t port_host_self;
diff --git
a/src/python.c
b/src/python.c
index
178f52d
..
53b3806
100644
(file)
--- a/
src/python.c
+++ b/
src/python.c
@@
-241,7
+241,7
@@
static char CollectdError_doc[] =
static pthread_t main_thread;
static PyOS_sighandler_t python_sigint_handler;
static pthread_t main_thread;
static PyOS_sighandler_t python_sigint_handler;
-static bool do_interactive
= 0
;
+static bool do_interactive;
/* This is our global thread state. Python saves some stuff in thread-local
* storage. So if we allow the interpreter to run in the background
/* This is our global thread state. Python saves some stuff in thread-local
* storage. So if we allow the interpreter to run in the background
diff --git
a/src/sensors.c
b/src/sensors.c
index
4d8e925
..
3969dc9
100644
(file)
--- a/
src/sensors.c
+++ b/
src/sensors.c
@@
-158,7
+158,7
@@
typedef struct featurelist {
} featurelist_t;
static char *conffile = NULL;
} featurelist_t;
static char *conffile = NULL;
-static bool use_labels
= 0
;
+static bool use_labels;
/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
#else /* if SENSORS_API_VERSION >= 0x500 */
/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
#else /* if SENSORS_API_VERSION >= 0x500 */
diff --git
a/src/statsd.c
b/src/statsd.c
index
34ce586
..
70c1a75
100644
(file)
--- a/
src/statsd.c
+++ b/
src/statsd.c
@@
-65,25
+65,25
@@
static c_avl_tree_t *metrics_tree = NULL;
static pthread_mutex_t metrics_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_t network_thread;
static pthread_mutex_t metrics_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_t network_thread;
-static bool network_thread_running
= 0
;
-static bool network_thread_shutdown
= 0
;
+static bool network_thread_running;
+static bool network_thread_shutdown;
static char *conf_node = NULL;
static char *conf_service = NULL;
static char *conf_node = NULL;
static char *conf_service = NULL;
-static bool conf_delete_counters
= 0
;
-static bool conf_delete_timers
= 0
;
-static bool conf_delete_gauges
= 0
;
-static bool conf_delete_sets
= 0
;
+static bool conf_delete_counters;
+static bool conf_delete_timers;
+static bool conf_delete_gauges;
+static bool conf_delete_sets;
static double *conf_timer_percentile = NULL;
static double *conf_timer_percentile = NULL;
-static size_t conf_timer_percentile_num
= 0
;
+static size_t conf_timer_percentile_num;
-static bool conf_counter_sum
= 0
;
-static bool conf_timer_lower
= 0
;
-static bool conf_timer_upper
= 0
;
-static bool conf_timer_sum
= 0
;
-static bool conf_timer_count
= 0
;
+static bool conf_counter_sum;
+static bool conf_timer_lower;
+static bool conf_timer_upper;
+static bool conf_timer_sum;
+static bool conf_timer_count;
/* Must hold metrics_lock when calling this function. */
static statsd_metric_t *statsd_metric_lookup_unsafe(char const *name, /* {{{ */
/* Must hold metrics_lock when calling this function. */
static statsd_metric_t *statsd_metric_lookup_unsafe(char const *name, /* {{{ */
diff --git
a/src/swap.c
b/src/swap.c
index
427192a
..
5fdb6ea
100644
(file)
--- a/
src/swap.c
+++ b/
src/swap.c
@@
-74,14
+74,14
@@
#if KERNEL_LINUX
#define SWAP_HAVE_REPORT_BY_DEVICE 1
static derive_t pagesize;
#if KERNEL_LINUX
#define SWAP_HAVE_REPORT_BY_DEVICE 1
static derive_t pagesize;
-static bool report_bytes
= 0
;
-static bool report_by_device
= 0
;
+static bool report_bytes;
+static bool report_by_device;
/* #endif KERNEL_LINUX */
#elif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS
#define SWAP_HAVE_REPORT_BY_DEVICE 1
static derive_t pagesize;
/* #endif KERNEL_LINUX */
#elif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS
#define SWAP_HAVE_REPORT_BY_DEVICE 1
static derive_t pagesize;
-static bool report_by_device
= 0
;
+static bool report_by_device;
/* #endif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS */
#elif HAVE_SWAPCTL && HAVE_SWAPCTL_THREE_ARGS
/* #endif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS */
#elif HAVE_SWAPCTL && HAVE_SWAPCTL_THREE_ARGS
@@
-110,7
+110,7
@@
static int pagesize;
#endif /* HAVE_LIBSTATGRAB */
static bool values_absolute = 1;
#endif /* HAVE_LIBSTATGRAB */
static bool values_absolute = 1;
-static bool values_percentage
= 0
;
+static bool values_percentage;
static bool report_io = 1;
static int swap_config(oconfig_item_t *ci) /* {{{ */
static bool report_io = 1;
static int swap_config(oconfig_item_t *ci) /* {{{ */
diff --git
a/src/tail_csv.c
b/src/tail_csv.c
index
9331142
..
2328113
100644
(file)
--- a/
src/tail_csv.c
+++ b/
src/tail_csv.c
@@
-513,7
+513,7
@@
static int tcsv_config(oconfig_item_t *ci) {
} /* int tcsv_config */
static int tcsv_init(void) { /* {{{ */
} /* int tcsv_config */
static int tcsv_init(void) { /* {{{ */
- static bool have_init
= 0
;
+ static bool have_init;
metric_definition_t *md;
if (have_init)
metric_definition_t *md;
if (have_init)
diff --git
a/src/thermal.c
b/src/thermal.c
index
0f7f79f
..
cbd168b
100644
(file)
--- a/
src/thermal.c
+++ b/
src/thermal.c
@@
-35,7
+35,7
@@
static const char *config_keys[] = {"Device", "IgnoreSelected",
static const char *const dirname_sysfs = "/sys/class/thermal";
static const char *const dirname_procfs = "/proc/acpi/thermal_zone";
static const char *const dirname_sysfs = "/sys/class/thermal";
static const char *const dirname_procfs = "/proc/acpi/thermal_zone";
-static bool force_procfs
= 0
;
+static bool force_procfs;
static ignorelist_t *device_list;
enum dev_type { TEMP = 0, COOLING_DEV };
static ignorelist_t *device_list;
enum dev_type { TEMP = 0, COOLING_DEV };
diff --git
a/src/turbostat.c
b/src/turbostat.c
index
5e837b8
..
89bf3cb
100644
(file)
--- a/
src/turbostat.c
+++ b/
src/turbostat.c
@@
-197,8
+197,8
@@
static struct pkg_data {
#define EVEN_COUNTERS thread_even, core_even, package_even
static bool is_even = 1;
#define EVEN_COUNTERS thread_even, core_even, package_even
static bool is_even = 1;
-static bool allocated
= 0
;
-static bool initialized
= 0
;
+static bool allocated;
+static bool initialized;
#define GET_THREAD(thread_base, thread_no, core_no, pkg_no) \
(thread_base + (pkg_no)*topology.num_cores * topology.num_threads + \
#define GET_THREAD(thread_base, thread_no, core_no, pkg_no) \
(thread_base + (pkg_no)*topology.num_cores * topology.num_threads + \
diff --git
a/src/unixsock.c
b/src/unixsock.c
index
47baffb
..
67edab1
100644
(file)
--- a/
src/unixsock.c
+++ b/
src/unixsock.c
@@
-62,7
+62,7
@@
static int sock_fd = -1;
static char *sock_file = NULL;
static char *sock_group = NULL;
static int sock_perms = S_IRWXU | S_IRWXG;
static char *sock_file = NULL;
static char *sock_group = NULL;
static int sock_perms = S_IRWXU | S_IRWXG;
-static bool delete_socket
= 0
;
+static bool delete_socket;
static pthread_t listen_thread = (pthread_t)0;
static pthread_t listen_thread = (pthread_t)0;
diff --git
a/src/utils_vl_lookup_test.c
b/src/utils_vl_lookup_test.c
index
8a71a3a
..
d7226b9
100644
(file)
--- a/
src/utils_vl_lookup_test.c
+++ b/
src/utils_vl_lookup_test.c
@@
-29,8
+29,8
@@
#include "testing.h"
#include "utils_vl_lookup.h"
#include "testing.h"
#include "utils_vl_lookup.h"
-static bool expect_new_obj
= 0
;
-static bool have_new_obj
= 0
;
+static bool expect_new_obj;
+static bool have_new_obj;
static lookup_identifier_t last_class_ident;
static lookup_identifier_t last_obj_ident;
static lookup_identifier_t last_class_ident;
static lookup_identifier_t last_obj_ident;
diff --git
a/src/varnish.c
b/src/varnish.c
index
9000882
..
0d93993
100644
(file)
--- a/
src/varnish.c
+++ b/
src/varnish.c
@@
-93,7
+93,7
@@
struct user_config_s {
};
typedef struct user_config_s user_config_t; /* }}} */
};
typedef struct user_config_s user_config_t; /* }}} */
-static bool have_instance
= 0
;
+static bool have_instance;
static int varnish_submit(const char *plugin_instance, /* {{{ */
const char *category, const char *type,
static int varnish_submit(const char *plugin_instance, /* {{{ */
const char *category, const char *type,