int status;
int i;
- data = malloc (sizeof (*data));
+ data = calloc (1, sizeof (*data));
if (data == NULL)
{
- ERROR ("tn_create: malloc failed.");
+ ERROR ("tn_create: calloc failed.");
return (-ENOMEM);
}
- memset (data, 0, sizeof (*data));
data->message = NULL;
data->severity = 0;
return (-1);
}
- act = malloc (sizeof (*act));
+ act = calloc (1, sizeof (*act));
if (act == NULL)
{
- ERROR ("tr_config_add_action: malloc failed.");
+ ERROR ("tr_config_add_action: calloc failed.");
return (-ENOMEM);
}
- memset (act, 0, sizeof (*act));
act->replacement = NULL;
act->may_be_empty = may_be_empty;
int status;
int i;
- data = malloc (sizeof (*data));
+ data = calloc (1, sizeof (*data));
if (data == NULL)
{
- ERROR ("tr_create: malloc failed.");
+ ERROR ("tr_create: calloc failed.");
return (-ENOMEM);
}
- memset (data, 0, sizeof (*data));
data->host = NULL;
data->plugin = NULL;
int status;
int i;
- data = malloc (sizeof (*data));
+ data = calloc (1, sizeof (*data));
if (data == NULL)
{
- ERROR ("ts_create: malloc failed.");
+ ERROR ("ts_create: calloc failed.");
return (-ENOMEM);
}
- memset (data, 0, sizeof (*data));
data->factor = NAN;
data->offset = NAN;
int status;
int i;
- data = malloc (sizeof (*data));
+ data = calloc (1, sizeof (*data));
if (data == NULL)
{
- ERROR ("ts_create: malloc failed.");
+ ERROR ("ts_create: calloc failed.");
return (-ENOMEM);
}
- memset (data, 0, sizeof (*data));
data->host = NULL;
data->plugin = NULL;