projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use true and false for assignments to bool
[collectd.git]
/
src
/
disk.c
diff --git
a/src/disk.c
b/src/disk.c
index
116fc24
..
962b7c3
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
@@
-106,9
+106,9
@@
typedef struct diskstats {
derive_t avg_read_time;
derive_t avg_write_time;
derive_t avg_read_time;
derive_t avg_write_time;
-
_B
ool has_merged;
-
_B
ool has_in_progress;
-
_B
ool has_io_time;
+
b
ool has_merged;
+
b
ool has_in_progress;
+
b
ool has_io_time;
struct diskstats *next;
} diskstats_t;
struct diskstats *next;
} diskstats_t;
@@
-170,7
+170,7
@@
static int disk_config(const char *key, const char *value) {
ignorelist_set_invert(ignorelist, invert);
} else if (strcasecmp("UseBSDName", key) == 0) {
#if HAVE_IOKIT_IOKITLIB_H
ignorelist_set_invert(ignorelist, invert);
} else if (strcasecmp("UseBSDName", key) == 0) {
#if HAVE_IOKIT_IOKITLIB_H
- use_bsd_name = IS_TRUE(value)
? 1 : 0
;
+ use_bsd_name = IS_TRUE(value);
#else
WARNING("disk plugin: The \"UseBSDName\" option is only supported "
"on Mach / Mac OS X and will be ignored.");
#else
WARNING("disk plugin: The \"UseBSDName\" option is only supported "
"on Mach / Mac OS X and will be ignored.");
@@
-817,13
+817,13
@@
static int disk_read(void) {
ds->write_time = write_time;
if (read_merged || write_merged)
ds->write_time = write_time;
if (read_merged || write_merged)
- ds->has_merged =
1
;
+ ds->has_merged =
true
;
if (in_progress)
if (in_progress)
- ds->has_in_progress =
1
;
+ ds->has_in_progress =
true
;
if (io_time)
if (io_time)
- ds->has_io_time =
1
;
+ ds->has_io_time =
true
;
} /* if (is_disk) */
} /* if (is_disk) */