projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt plugin: set bool to false, not 0
[collectd.git]
/
src
/
utils_rrdcreate.c
diff --git
a/src/utils_rrdcreate.c
b/src/utils_rrdcreate.c
index
6cb5446
..
ce7838d
100644
(file)
--- a/
src/utils_rrdcreate.c
+++ b/
src/utils_rrdcreate.c
@@
-61,7
+61,7
@@
static int rra_types_num = STATIC_ARRAY_SIZE(rra_types);
static pthread_mutex_t librrd_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
static pthread_mutex_t librrd_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
-static async_create_file_t *async_creation_list
= NULL
;
+static async_create_file_t *async_creation_list;
static pthread_mutex_t async_creation_lock = PTHREAD_MUTEX_INITIALIZER;
/*
static pthread_mutex_t async_creation_lock = PTHREAD_MUTEX_INITIALIZER;
/*
@@
-251,9
+251,7
@@
static int ds_get(char ***ret, /* {{{ */
ds_def = calloc(ds->ds_num, sizeof(*ds_def));
if (ds_def == NULL) {
ds_def = calloc(ds->ds_num, sizeof(*ds_def));
if (ds_def == NULL) {
- char errbuf[1024];
- ERROR("rrdtool plugin: calloc failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("rrdtool plugin: calloc failed: %s", STRERRNO);
return -1;
}
return -1;
}
@@
-512,9
+510,8
@@
static void *srrd_create_thread(void *targs) /* {{{ */
status = rename(tmpfile, args->filename);
if (status != 0) {
status = rename(tmpfile, args->filename);
if (status != 0) {
- char errbuf[1024];
ERROR("srrd_create_thread: rename (\"%s\", \"%s\") failed: %s", tmpfile,
ERROR("srrd_create_thread: rename (\"%s\", \"%s\") failed: %s", tmpfile,
- args->filename,
sstrerror(errno, errbuf, sizeof(errbuf))
);
+ args->filename,
STRERRNO
);
unlink(tmpfile);
unlock_file(args->filename);
srrd_create_args_destroy(args);
unlink(tmpfile);
unlock_file(args->filename);
srrd_create_args_destroy(args);
@@
-559,9
+556,7
@@
static int srrd_create_async(const char *filename, /* {{{ */
status = pthread_create(&thread, &attr, srrd_create_thread, args);
if (status != 0) {
status = pthread_create(&thread, &attr, srrd_create_thread, args);
if (status != 0) {
- char errbuf[1024];
- ERROR("srrd_create_async: pthread_create failed: %s",
- sstrerror(status, errbuf, sizeof(errbuf)));
+ ERROR("srrd_create_async: pthread_create failed: %s", STRERROR(status));
pthread_attr_destroy(&attr);
srrd_create_args_destroy(args);
return status;
pthread_attr_destroy(&attr);
srrd_create_args_destroy(args);
return status;
@@
-605,9
+600,7
@@
int cu_rrd_create_file(const char *filename, /* {{{ */
argc = ds_num + rra_num;
if ((argv = malloc(sizeof(*argv) * (argc + 1))) == NULL) {
argc = ds_num + rra_num;
if ((argv = malloc(sizeof(*argv) * (argc + 1))) == NULL) {
- char errbuf[1024];
- ERROR("cu_rrd_create_file failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("cu_rrd_create_file failed: %s", STRERRNO);
rra_free(rra_num, rra_def);
ds_free(ds_num, ds_def);
return -1;
rra_free(rra_num, rra_def);
ds_free(ds_num, ds_def);
return -1;