X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrdtool.c;h=e5f964e5bdc4fe01084267ee0b821e298fd42650;hb=b4c8f3f762d666742c774ab3b45815e5a416e5da;hp=b366a9c64166eeeae135f700b069e81578cac28a;hpb=4dc9287f4de0283ae986444377075dcbdada2871;p=collectd.git diff --git a/src/rrdtool.c b/src/rrdtool.c index b366a9c6..e5f964e5 100644 --- a/src/rrdtool.c +++ b/src/rrdtool.c @@ -185,7 +185,7 @@ static int srrd_update (char *filename, char *template, if (status != 0) { WARNING ("rrdtool plugin: rrd_update_r failed: %s: %s", - argv[1], rrd_get_error ()); + filename, rrd_get_error ()); } sfree (new_argv); @@ -998,7 +998,7 @@ static int rrd_config (const char *key, const char *value) } else if (strcasecmp ("StepSize", key) == 0) { - int temp = atoi (value); + unsigned long temp = strtoul (value, NULL, 0); if (temp > 0) rrdcreate_config.stepsize = temp; } @@ -1161,8 +1161,6 @@ static int rrd_init (void) return (0); init_once = 1; - if (rrdcreate_config.stepsize < 0) - rrdcreate_config.stepsize = 0; if (rrdcreate_config.heartbeat <= 0) rrdcreate_config.heartbeat = 2 * rrdcreate_config.stepsize; @@ -1206,7 +1204,7 @@ static int rrd_init (void) } queue_thread_running = 1; - DEBUG ("rrdtool plugin: rrd_init: datadir = %s; stepsize = %i;" + DEBUG ("rrdtool plugin: rrd_init: datadir = %s; stepsize = %lu;" " heartbeat = %i; rrarows = %i; xff = %lf;", (datadir == NULL) ? "(null)" : datadir, rrdcreate_config.stepsize,