X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrdtool.c;h=56a82d0321b8a875fdc1a8b5c93e312550388b77;hb=59c7ee1cafaf53814838794908dd84f8101334c7;hp=b366a9c64166eeeae135f700b069e81578cac28a;hpb=ba2ee9aec4c0454eed8f29b4c6ce96c6fc372346;p=collectd.git diff --git a/src/rrdtool.c b/src/rrdtool.c index b366a9c6..56a82d03 100644 --- a/src/rrdtool.c +++ b/src/rrdtool.c @@ -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,