node->conn = redisConnectWithTimeout ((char *)node->host, node->port, node->timeout);
if (node->conn == NULL)
{
- ERROR ("write_redis plugin: Connecting to host \"%s\" (port %i) failed: Unkown reason",
+ ERROR ("write_redis plugin: Connecting to host \"%s\" (port %i) failed: Unknown reason",
(node->host != NULL) ? node->host : "localhost",
(node->port != 0) ? node->port : 6379);
pthread_mutex_unlock (&node->lock);
ssnprintf (cb_name, sizeof (cb_name), "write_redis/%s", node->name);
- user_data_t ud = {
- .data = node,
- .free_func = wr_config_free
- };
-
- status = plugin_register_write (cb_name, wr_write, &ud);
+ status = plugin_register_write (cb_name, wr_write,
+ &(user_data_t) {
+ .data = node,
+ .free_func = wr_config_free,
+ });
}
if (status != 0)