summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c89ec2)
raw | patch | inline | side by side (parent: 0c89ec2)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 13 Jan 2007 15:39:44 +0000 (16:39 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 13 Jan 2007 15:39:44 +0000 (16:39 +0100) |
src/rrdtool.c | patch | blob | history |
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 7bf407abdb6240a624201e6e6dd3437ca02cf3d4..96eee579c2972430b52f62369b640d6ea98ab034 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Free Software Foundation; only version 2 of the License is applicable.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
#include "collectd.h"
#include "plugin.h"
#include "common.h"
+#include "utils_debug.h"
/*
* This weird macro cascade forces the glibc to define `NAN'. I don't know
char max[32];
char buffer[128];
+ DBG ("ds->ds_num = %i", ds->ds_num);
+
ds_def = (char **) malloc (ds->ds_num * sizeof (char *));
if (ds_def == NULL)
{
}
else
{
- snprintf (buffer, sizeof (min), "%lf", d->min);
+ snprintf (min, sizeof (min), "%lf", d->min);
min[sizeof (min) - 1] = '\0';
}
}
else
{
- snprintf (buffer, sizeof (max), "%lf", d->max);
+ snprintf (max, sizeof (max), "%lf", d->max);
max[sizeof (max) - 1] = '\0';
}
break;
ds_def[ds_num] = sstrdup (buffer);
- ds_num++;
} /* for ds_num = 0 .. ds->ds_num */
+#if COLLECT_DEBUG
+{
+ int i;
+ DBG ("ds_num = %i", ds_num);
+ for (i = 0; i < ds_num; i++)
+ DBG (" %s", ds_def[i]);
+}
+#endif
+
if (ds_num != ds->ds_num)
{
ds_free (ds_num, ds_def);