ds_def = (char **) malloc (ds->ds_num * sizeof (char *));
if (ds_def == NULL)
{
+ char errbuf[1024];
ERROR ("rrdtool plugin: malloc failed: %s",
- strerror (errno));
+ sstrerror (errno, errbuf, sizeof (errbuf)));
return (-1);
}
memset (ds_def, '\0', ds->ds_num * sizeof (char *));
if ((argv = (char **) malloc (sizeof (char *) * (argc + 1))) == NULL)
{
- ERROR ("rrd_create failed: %s", strerror (errno));
+ char errbuf[1024];
+ ERROR ("rrd_create failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
return (-1);
}
(rc->values_num + 1) * sizeof (char *));
if (rc->values == NULL)
{
+ char errbuf[1024];
ERROR ("rrdtool plugin: realloc failed: %s",
- strerror (errno));
+ sstrerror (errno, errbuf, sizeof (errbuf)));
if (cache != NULL)
{
void *cache_key = NULL;
if (cache_key == NULL)
{
+ char errbuf[1024];
ERROR ("rrdtool plugin: strdup failed: %s",
- strerror (errno));
+ sstrerror (errno, errbuf, sizeof (errbuf)));
sfree (rc->values[0]);
sfree (rc->values);
sfree (rc);
(keys_num + 1) * sizeof (char *));
if (keys == NULL)
{
- DEBUG ("realloc failed: %s", strerror (errno));
+ char errbuf[1024];
ERROR ("rrdtool plugin: "
"realloc failed: %s",
- strerror (errno));
+ sstrerror (errno, errbuf,
+ sizeof (errbuf)));
avl_iterator_destroy (iter);
return;
}
}
else
{
- ERROR ("stat(%s) failed: %s",
- filename, strerror (errno));
+ char errbuf[1024];
+ ERROR ("stat(%s) failed: %s", filename,
+ sstrerror (errno, errbuf,
+ sizeof (errbuf)));
return (-1);
}
}