static pthread_t *subscriber_threads = NULL;
static size_t subscriber_threads_num = 0;
-static bool subscriber_threads_running = 1;
+static bool subscriber_threads_running = true;
#define CONF(c, f) (((c)->f != NULL) ? (c)->f : def_##f)
static char *conf_service = NULL;
/* Defaults to false for backwards compatibility. */
static bool conf_report_seconds;
-static bool conf_persistent_conn = 1;
+static bool conf_persistent_conn = true;
static int global_sockfd = -1;
/* FIXME: Enabled by default for backwards compatibility. */
/* TODO: Remove time parsing code. */
-static bool config_parse_time = 1;
+static bool config_parse_time = true;
static char *url = NULL;
static int global_opcodes = 1;
static struct sigaction sigint_action;
static struct sigaction sigterm_action;
-static bool loop = 1;
+static bool loop = true;
__attribute__((noreturn)) static void exit_usage(int exit_status) /* {{{ */
{
* determine how many CPUs there were. Reset to 0 by cpu_reset(). */
static size_t global_cpu_num = 0;
-static bool report_by_cpu = 1;
-static bool report_by_state = 1;
+static bool report_by_cpu = true;
+static bool report_by_state = true;
static bool report_percent;
static bool report_num_cpu;
static bool report_guest;
-static bool subtract_guest = 1;
+static bool subtract_guest = true;
static const char *config_keys[] = {"ReportByCpu", "ReportByState",
"ReportNumCpu", "ValuesPercentage",
static write_queue_t *write_queue_head;
static write_queue_t *write_queue_tail;
static long write_queue_length = 0;
-static bool write_loop = 1;
+static bool write_loop = true;
static pthread_mutex_t write_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t write_cond = PTHREAD_COND_INITIALIZER;
static pthread_t *write_threads = NULL;
static bool by_device;
static bool report_inodes;
-static bool values_absolute = 1;
+static bool values_absolute = true;
static bool values_percentage;
static int df_init(void) {
static const char *config_keys[] = {"ValuesAbsolute", "ValuesPercentage"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static bool values_absolute = 1;
+static bool values_absolute = true;
static bool values_percentage;
static int fhcount_config(const char *key, const char *value) {
static const char g_plugin_name[] = "hugepages";
-static bool g_flag_rpt_numa = 1;
-static bool g_flag_rpt_mm = 1;
+static bool g_flag_rpt_numa = true;
+static bool g_flag_rpt_mm = true;
-static bool g_values_pages = 1;
+static bool g_values_pages = true;
static bool g_values_bytes;
static bool g_values_percent;
static ignorelist_t *ignorelist = NULL;
-static bool report_inactive = 1;
+static bool report_inactive = true;
#ifdef HAVE_LIBKSTAT
#if HAVE_KSTAT_H
static bool have_gcrypt(void) /* {{{ */
{
static bool result;
- static bool need_init = 1;
+ static bool need_init = true;
if (!need_init)
return result;
#error "No applicable input method."
#endif
-static bool values_absolute = 1;
+static bool values_absolute = true;
static bool values_percentage;
static int memory_config(oconfig_item_t *ci) /* {{{ */
"ShowPower", "Power", "IgnoreSelectedPower"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static bool show_cpu = 1;
-static bool show_cpu_cores = 1;
-static bool show_memory = 1;
-static bool show_temps = 1;
+static bool show_cpu = true;
+static bool show_cpu_cores = true;
+static bool show_memory = true;
+static bool show_temps = true;
static ignorelist_t *temp_ignore = NULL;
-static bool show_power = 1;
+static bool show_power = true;
static ignorelist_t *power_ignore = NULL;
static int mic_init(void) {
static const char *config_keys[] = {"ReportV2", "ReportV3", "ReportV4"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static bool report_v2 = 1;
-static bool report_v3 = 1;
-static bool report_v4 = 1;
+static bool report_v2 = true;
+static bool report_v3 = true;
+static bool report_v4 = true;
/*
see /proc/net/rpc/nfs
"IncludeUnitID"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static bool do_reverse_lookups = 1;
+static bool do_reverse_lookups = true;
/* 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
typedef struct vpn_status_s vpn_status_t;
static bool new_naming_schema;
-static bool collect_compression = 1;
+static bool collect_compression = true;
static bool collect_user_count;
-static bool collect_individual_users = 1;
+static bool collect_individual_users = true;
static const char *config_keys[] = {
"StatusFile", "Compression", /* old, deprecated name */
* private variables
*/
-static bool register_legacy_flush = 1;
+static bool register_legacy_flush = true;
/* if perl_threads != NULL perl_threads->head must
* point to the "base" thread */
static procstat_t *list_head_g = NULL;
-static bool want_init = 1;
+static bool want_init = true;
static bool report_ctx_switch;
static bool report_fd_num;
static bool report_maps_num;
*/
static char *datadir = NULL;
static char *daemon_address = NULL;
-static bool config_create_files = 1;
-static bool config_collect_stats = 1;
+static bool config_create_files = true;
+static bool config_collect_stats = true;
static rrdcreate_config_t rrdcreate_config = {
/* stepsize = */ 0,
/* heartbeat = */ 0,
#error "No applicable input method."
#endif /* HAVE_LIBSTATGRAB */
-static bool values_absolute = 1;
+static bool values_absolute = true;
static bool values_percentage;
-static bool report_io = 1;
+static bool report_io = true;
static int swap_config(oconfig_item_t *ci) /* {{{ */
{
#define DELTA_COUNTERS thread_delta, core_delta, package_delta
#define ODD_COUNTERS thread_odd, core_odd, package_odd
#define EVEN_COUNTERS thread_even, core_even, package_even
-static bool is_even = 1;
+static bool is_even = true;
static bool allocated;
static bool initialized;