diff --git a/src/write_riemann.c b/src/write_riemann.c
index a67f94cc62732972421a4d85196cdce012916bc3..73d202c42fe8f228aaea46279dd12827a16d0371 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
#include "utils_cache.h"
#include "riemann.pb-c.h"
-#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
msg__init (msg);
/* Set up events. First, the list of pointers. */
- msg->n_events = (size_t) vl->values_len;
+ msg->n_events = vl->values_len;
msg->events = calloc (msg->n_events, sizeof (*msg->events));
if (msg->events == NULL)
{
status = write_riemann_threshold_check(ds, vl, statuses);
if (status != 0)
return status;
+ } else {
+ memset (statuses, 0, sizeof (statuses));
}
if (host->use_tcp == 1 && host->batch_mode) {