X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_tune.c;h=52651fdfe4cd3886a301dd27708049fc7ee347ff;hp=6cd39ad979510a39a3f5dcfba43463995d49bddb;hb=96b0f4aace0deef034a792a08dc2d426cd2b61a4;hpb=56d67cdd0c5b2c27c9242a3d5810c7184917f663 diff --git a/src/rrd_tune.c b/src/rrd_tune.c index 6cd39ad..52651fd 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.0 Copyright by Tobi Oetiker, 1997-2009 + * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 ***************************************************************************** * change header parameters of an rrd ***************************************************************************** @@ -126,7 +126,8 @@ int rrd_tune( optcnt++; switch (opt) { case 'h': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%ld", ds_nam, &heartbeat)) != 2) { @@ -146,7 +147,8 @@ int rrd_tune( break; case 'i': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%lf", ds_nam, &min)) < 1) { rrd_set_error("invalid arguments for minimum ds value"); @@ -168,7 +170,8 @@ int rrd_tune( break; case 'a': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%lf", ds_nam, &max)) < 1) { rrd_set_error("invalid arguments for maximum ds value");