int i;
llentry_t *le;
int n;
- char **keys;
n = llist_size(*list);
if (n == 0) {
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);
-
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 (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;