diff --git a/src/target_scale.c b/src/target_scale.c
index 6169fa05d585ce4c7a97abc6c882b80dbbeb78db..74652ff81dbeeb6452f0fce8c2d01768e10d3836 100644 (file)
--- a/src/target_scale.c
+++ b/src/target_scale.c
/* Allocate space for the char pointers */
new_data_sources_num = data->data_sources_num + ((size_t) ci->values_num);
- temp = (char **) realloc (data->data_sources,
+ temp = realloc (data->data_sources,
new_data_sources_num * sizeof (char *));
if (temp == NULL)
{
int status;
int i;
- data = (ts_data_t *) 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;