**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "configfile.h"
else
return (1);
- ip_chain_t temp, *final, **list;
+ ip_chain_t temp = { 0 };
+ ip_chain_t *final, **list;
char *table;
int table_len;
char *chain;
char *fields[4];
int fields_num;
- memset (&temp, 0, sizeof (temp));
-
value_copy = strdup (value);
if (value_copy == NULL)
{
table = NULL;
chain = NULL;
- list = (ip_chain_t **) realloc (chain_list, (chain_num + 1) * sizeof (ip_chain_t *));
+ list = realloc (chain_list, (chain_num + 1) * sizeof (ip_chain_t *));
if (list == NULL)
{
char errbuf[1024];
}
chain_list = list;
- final = (ip_chain_t *) malloc( sizeof(temp) );
+ final = malloc(sizeof (*final));
if (final == NULL)
{
char errbuf[1024];