projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.8'
[collectd.git]
/
src
/
daemon
/
plugin.c
diff --git
a/src/daemon/plugin.c
b/src/daemon/plugin.c
index
a99e1cd
..
de04665
100644
(file)
--- a/
src/daemon/plugin.c
+++ b/
src/daemon/plugin.c
@@
-320,7
+320,6
@@
static void log_list_callbacks(llist_t **list, /* {{{ */
int i;
llentry_t *le;
int n;
int i;
llentry_t *le;
int n;
- char **keys;
n = llist_size(*list);
if (n == 0) {
n = llist_size(*list);
if (n == 0) {
@@
-328,11
+327,9
@@
static void log_list_callbacks(llist_t **list, /* {{{ */
return;
}
return;
}
- keys = calloc(n, sizeof(char *));
-
+ char **keys = calloc(n, sizeof(*keys));
if (keys == NULL) {
ERROR("%s: failed to allocate memory for list of callbacks", comment);
if (keys == NULL) {
ERROR("%s: failed to allocate memory for list of callbacks", comment);
-
return;
}
return;
}
@@
-630,7
+627,7
@@
static void start_read_threads(size_t num) /* {{{ */
if (read_threads != NULL)
return;
if (read_threads != NULL)
return;
- read_threads =
(pthread_t *)calloc(num, sizeof(pthread_t
));
+ read_threads =
calloc(num, sizeof(*read_threads
));
if (read_threads == NULL) {
ERROR("plugin: start_read_threads: calloc failed.");
return;
if (read_threads == NULL) {
ERROR("plugin: start_read_threads: calloc failed.");
return;
@@
-819,7
+816,7
@@
static void start_write_threads(size_t num) /* {{{ */
if (write_threads != NULL)
return;
if (write_threads != NULL)
return;
- write_threads =
(pthread_t *)calloc(num, sizeof(pthread_t
));
+ write_threads =
calloc(num, sizeof(*write_threads
));
if (write_threads == NULL) {
ERROR("plugin: start_write_threads: calloc failed.");
return;
if (write_threads == NULL) {
ERROR("plugin: start_write_threads: calloc failed.");
return;
@@
-2112,7
+2109,7
@@
plugin_dispatch_multivalue(value_list_t const *template, /* {{{ */
stats_values_dropped++;
pthread_mutex_unlock(&statistics_lock);
}
stats_values_dropped++;
pthread_mutex_unlock(&statistics_lock);
}
- return
(0)
;
+ return
0
;
}
assert(template->values_len == 1);
}
assert(template->values_len == 1);