projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Treewide: use bool instead of _Bool
[collectd.git]
/
src
/
daemon
/
configfile.c
diff --git
a/src/daemon/configfile.c
b/src/daemon/configfile.c
index
f5086ae
..
97fe42b
100644
(file)
--- a/
src/daemon/configfile.c
+++ b/
src/daemon/configfile.c
@@
-76,7
+76,7
@@
typedef struct cf_value_map_s {
typedef struct cf_global_option_s {
const char *key;
char *value;
typedef struct cf_global_option_s {
const char *key;
char *value;
-
_B
ool from_cli; /* value set from CLI */
+
b
ool from_cli; /* value set from CLI */
const char *def;
} cf_global_option_t;
const char *def;
} cf_global_option_t;
@@
-245,7
+245,7
@@
static int dispatch_value_plugindir(oconfig_item_t *ci) {
static int dispatch_loadplugin(oconfig_item_t *ci) {
const char *name;
static int dispatch_loadplugin(oconfig_item_t *ci) {
const char *name;
-
_B
ool global = 0;
+
b
ool global = 0;
plugin_ctx_t ctx = {0};
plugin_ctx_t old_ctx;
int ret_val;
plugin_ctx_t ctx = {0};
plugin_ctx_t old_ctx;
int ret_val;
@@
-634,9
+634,7
@@
static oconfig_item_t *cf_read_dir(const char *dir, const char *pattern,
dh = opendir(dir);
if (dh == NULL) {
dh = opendir(dir);
if (dh == NULL) {
- char errbuf[1024];
- ERROR("configfile: opendir failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("configfile: opendir failed: %s", STRERRNO);
return NULL;
}
return NULL;
}
@@
-765,9
+763,7
@@
static oconfig_item_t *cf_read_generic(const char *path, const char *pattern,
status = stat(path_ptr, &statbuf);
if (status != 0) {
status = stat(path_ptr, &statbuf);
if (status != 0) {
- char errbuf[1024];
- WARNING("configfile: stat (%s) failed: %s", path_ptr,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("configfile: stat (%s) failed: %s", path_ptr, STRERRNO);
continue;
}
continue;
}
@@
-813,9
+809,7
@@
static oconfig_item_t *cf_read_generic(const char *path, const char *pattern,
status = stat(path, &statbuf);
if (status != 0) {
status = stat(path, &statbuf);
if (status != 0) {
- char errbuf[1024];
- ERROR("configfile: stat (%s) failed: %s", path,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("configfile: stat (%s) failed: %s", path, STRERRNO);
return NULL;
}
return NULL;
}
@@
-832,7
+826,7
@@
static oconfig_item_t *cf_read_generic(const char *path, const char *pattern,
/*
* Public functions
*/
/*
* Public functions
*/
-int global_option_set(const char *option, const char *value,
_B
ool from_cli) {
+int global_option_set(const char *option, const char *value,
b
ool from_cli) {
int i;
DEBUG("option = %s; value = %s;", option, value);
int i;
DEBUG("option = %s; value = %s;", option, value);
@@
-1116,7
+1110,7
@@
int cf_util_get_double(const oconfig_item_t *ci, double *ret_value) /* {{{ */
return 0;
} /* }}} int cf_util_get_double */
return 0;
} /* }}} int cf_util_get_double */
-int cf_util_get_boolean(const oconfig_item_t *ci,
_B
ool *ret_bool) /* {{{ */
+int cf_util_get_boolean(const oconfig_item_t *ci,
b
ool *ret_bool) /* {{{ */
{
if ((ci == NULL) || (ret_bool == NULL))
return EINVAL;
{
if ((ci == NULL) || (ret_bool == NULL))
return EINVAL;
@@
-1158,7
+1152,7
@@
int cf_util_get_boolean(const oconfig_item_t *ci, _Bool *ret_bool) /* {{{ */
int cf_util_get_flag(const oconfig_item_t *ci, /* {{{ */
unsigned int *ret_value, unsigned int flag) {
int status;
int cf_util_get_flag(const oconfig_item_t *ci, /* {{{ */
unsigned int *ret_value, unsigned int flag) {
int status;
-
_B
ool b;
+
b
ool b;
if (ret_value == NULL)
return EINVAL;
if (ret_value == NULL)
return EINVAL;