X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fiptables.c;h=0103725fa4a343fa712043a8f1a2162fd21a104e;hb=db35efb33e81d0a013e09a8a6ffa362ad5962f7c;hp=05e3e24b92b9716612b13748d8027521c289bd54;hpb=b76f88c5bafa82e3c939eb65c13acd431e07cc01;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index 05e3e24b..0103725f 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -204,7 +204,7 @@ static int iptables_config (const char *key, const char *value) 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]; @@ -215,7 +215,7 @@ static int iptables_config (const char *key, const char *value) } chain_list = list; - final = (ip_chain_t *) malloc( sizeof(temp) ); + final = malloc(sizeof (*final)); if (final == NULL) { char errbuf[1024];