projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree wide: Replace sstrerror() with STRERRNO.
[collectd.git]
/
src
/
daemon
/
configfile.c
diff --git
a/src/daemon/configfile.c
b/src/daemon/configfile.c
index
0d295c1
..
597779d
100644
(file)
--- a/
src/daemon/configfile.c
+++ b/
src/daemon/configfile.c
@@
-633,9
+633,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;
}
@@
-764,9
+762,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;
}
@@
-812,9
+808,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;
}
@@
-874,7
+868,8
@@
const char *global_option_get(const char *option) {
return NULL;
}
return NULL;
}
- return (cf_global_options[i].value != NULL) ? cf_global_options[i].value : cf_global_options[i].def;
+ return (cf_global_options[i].value != NULL) ? cf_global_options[i].value
+ : cf_global_options[i].def;
} /* char *global_option_get */
long global_option_get_long(const char *option, long default_value) {
} /* char *global_option_get */
long global_option_get_long(const char *option, long default_value) {
@@
-1031,6
+1026,7
@@
int cf_read(const char *filename) {
}
return ret;
}
return ret;
+
} /* int cf_read */
/* Assures the config option is a string, duplicates it and returns the copy in
} /* int cf_read */
/* Assures the config option is a string, duplicates it and returns the copy in