diff --git a/src/netlink.c b/src/netlink.c
index aa9760f9328b78eb87e14f70501bc1622a57f12d..5c3a9f007beb656aeefcc2a81152243671243d1e 100644 (file)
--- a/src/netlink.c
+++ b/src/netlink.c
#include "common.h"
#include <asm/types.h>
#include "common.h"
#include <asm/types.h>
-#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
{
ir_ignorelist_t *entry;
{
ir_ignorelist_t *entry;
- entry = (ir_ignorelist_t *) malloc (sizeof (ir_ignorelist_t));
+ entry = calloc (1, sizeof (*entry));
if (entry == NULL)
return (-1);
if (entry == NULL)
return (-1);
- memset (entry, '\0', sizeof (ir_ignorelist_t));
-
if (strcasecmp (dev, "All") != 0)
{
entry->device = strdup (dev);
if (strcasecmp (dev, "All") != 0)
{
entry->device = strdup (dev);
{
char **temp;
{
char **temp;
- temp = (char **) realloc (iflist, (msg->ifi_index + 1) * sizeof (char *));
+ temp = realloc (iflist, (msg->ifi_index + 1) * sizeof (char *));
if (temp == NULL)
{
ERROR ("netlink plugin: update_iflist: realloc failed.");
if (temp == NULL)
{
ERROR ("netlink plugin: update_iflist: realloc failed.");
const char *kind = NULL;
/* char *type_instance; */
const char *kind = NULL;
/* char *type_instance; */
- char *tc_type;
+ const char *tc_type;
char tc_inst[DATA_MAX_NAME_LEN];
_Bool stats_submitted = 0;
char tc_inst[DATA_MAX_NAME_LEN];
_Bool stats_submitted = 0;