#include "utils_cache.h"
-#include <pthread.h>
#include <netdb.h>
#ifndef WT_DEFAULT_NODE
return 0;
}
- if (cb->send_buf_fill <= 0)
+ if (cb->send_buf_fill == 0)
{
cb->send_buf_init_time = cdtime();
return 0;
static int wt_callback_init(struct wt_callback *cb)
{
- struct addrinfo ai_hints;
+ struct addrinfo ai_hints = { 0 };
struct addrinfo *ai_list;
struct addrinfo *ai_ptr;
int status;
if (cb->sock_fd > 0)
return 0;
- memset(&ai_hints, 0, sizeof(ai_hints));
#ifdef AI_ADDRCONFIG
ai_hints.ai_flags |= AI_ADDRCONFIG;
#endif
static int wt_config_tsd(oconfig_item_t *ci)
{
struct wt_callback *cb;
- user_data_t user_data;
+ user_data_t user_data = { 0 };
char callback_name[DATA_MAX_NAME_LEN];
int i;
cb->node != NULL ? cb->node : WT_DEFAULT_NODE,
cb->service != NULL ? cb->service : WT_DEFAULT_SERVICE);
- memset(&user_data, 0, sizeof(user_data));
user_data.data = cb;
user_data.free_func = wt_callback_free;
plugin_register_write(callback_name, wt_write, &user_data);